Re: COPY syntax improvement

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: COPY syntax improvement
Date: 2002-06-20 02:46:44
Message-ID: 200206200246.g5K2kj616125@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > COPY table
> > FROM { 'filename' | stdin }
> > [ [ WITH ]
> > [ BINARY ]
> > [ OIDS ]
> > [ DELIMITER 'delimiter' ]
> > [ NULL AS 'null string' ] ]
>
> I'm not sure what was wrong with the old syntax except for fixing the
> DELIMITER plural. For example, the current
>
> copy mytable with oids from stdin using delimiter '|';
>
> reads very pleasantly, but
>
> copy mytable from stdin with oids delimiter '|';
>
> isn't nearly as good. (E.g., it's not the oids' delimiter, and it's not
> *with* delimiter because you don't actually copy the delimiter, you just
> use it.)

New supported syntax I posted is now DELIMITER [AS] ' '. I noticed that
problem myself, that NULL had AS but DELIMITER didn't.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2002-06-20 10:01:53 Democracy and organisation : let's make a revolution in the Debian way
Previous Message Bruce Momjian 2002-06-20 02:43:20 Re: COPY syntax improvement