Question about weird COPY syntax

From: Evan Carroll <me(at)evancarroll(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Question about weird COPY syntax
Date: 2010-06-17 15:50:02
Message-ID: AANLkTingzWPVPT5zPe0cbKVetuLmWopxRFu7bd7gshpd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Why is it that "DELIMITER", and "NULL" options are under [WITH] but
not under [CSV]. This seems at least slightly awkward.

Command: COPY
Description: copy data between a file and a table
Syntax:
COPY tablename [ ( column [, ...] ) ]
FROM { 'filename' | STDIN }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] 'delimiter' ]
[ NULL [ AS ] 'null string' ]
[ CSV [ HEADER ] <-
Why not put them under this.
[ QUOTE [ AS ] 'quote' ]
[ ESCAPE [ AS ] 'escape' ]
[ FORCE NOT NULL column [, ...] ]

--
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-06-17 16:23:25 Re: Wrong number of empty toast pages
Previous Message Andreas 2010-06-17 15:12:36 weird sortorder issue