Skip site navigation (1) Skip section navigation (2)

Re: COPY for CSV documentation

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: COPY for CSV documentation
Date: 2004-04-12 06:26:14
Message-ID: 1698.24.211.141.25.1081751174.squirrel@www.dunslane.net (view raw or flat)
Thread:
Lists: pgsql-patches
Bruce Momjian said:
>
>       COPY tablename [ ( column [, ...] ) ]
>           TO { 'filename' | STDOUT }
>           [ [ WITH ]
>                 [ BINARY ]
>                 [ OIDS ]
>                 [ DELIMITER [ AS ] 'delimiter' ]
>                 [ NULL [ AS ] 'null string' ] ]
>
>                 [ CSV [ QUOTE 'quote' ] [ ESCAPE 'escape' ] ]
>
> DELIMITER default to tab, except in CSV mode, where it is a comma.
>
> That sounds very clear to me.
>


TIMTOWTDI, as we say in the perl world, and we could debate it endlessly.
This looks fine to me.

a few points:

. ESCAPE should default to same-as-quote
. in CSV mode, NULL should default to '' - that was in what I sent in.
. I assume that for now we will enforce the one byte rule for QUOTE and
ESCAPE as well as for DELIMITER.

cheers

andrew





In response to

Responses

pgsql-patches by date

Next:From: Sean ChittendenDate: 2004-04-12 06:37:26
Subject: Re: Information/schema hiding...
Previous:From: Andrew DunstanDate: 2004-04-12 06:05:01
Subject: Re: COPY for CSV documentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group