Re: COPY enhancements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY enhancements
Date
Msg-id 19938.1252678731@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY enhancements  (Emmanuel Cecchet <manu@asterdata.com>)
Responses Re: COPY enhancements
Re: COPY enhancements
List pgsql-hackers
Emmanuel Cecchet <manu@asterdata.com> writes:
> The new syntax could look like:

> COPY /tablename/ [ ( /column/ [, ...] ) ]
>     FROM { '/filename/' | STDIN }
>     [ [, BINARY ]
>       [, OIDS ]
>       [, DELIMITER [ AS ] '/delimiter/' ]
>       [, NULL [ AS ] '/null string/' ]
>       [, CSV [ HEADER ]
>              [ QUOTE [ AS ] '/quote/' ] 
>              [ ESCAPE [ AS ] '/escape/' ]
>              [ FORCE NOT NULL (/column/ [, ...]) ]
>       [, ERRORS { SKIP | 
>                   LOG INTO { tablename | 'filename' }
>                     [ LABEL label_name ]
>                     [ KEY key_name ]
>                     [ MAX ERRORS /count/ ] } ]

> Is this what you had in mind?

No. because that doesn't do a darn thing to make the option set less
hard-wired into the syntax.  I was thinking of a strict keyword/value
format with non-wired-in keywords ... and only *one* keyword per value.
See EXPLAIN.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why does LOG have higher priority than ERROR and WARNING?
Next
From: "Kevin Grittner"
Date:
Subject: Re: RfD: more powerful "any" types