Re: COPY for CSV documentation

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: COPY for CSV documentation
Date: 2004-04-12 08:18:46
Message-ID: 200404120818.i3C8Ik024064@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Andrew Dunstan wrote:
> 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.

Yes, agreed.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-04-12 11:09:54 Re: COPY for CSV documentation
Previous Message Sean Chittenden 2004-04-12 06:37:26 Re: Information/schema hiding...