Re: Re: COPY BINARY file format proposal - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Re: COPY BINARY file format proposal
Date
Msg-id 200012102350.SAA10451@candle.pha.pa.us
Whole thread Raw
In response to Re: Re: COPY BINARY file format proposal  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
> Also, IIRC part of the problem with text-based COPY is that we can't
> specify field order (I think this affectes dumping the regression DB).
> Would it be possible to add the ability to (a) specify field order, and (b)
> dump a subset of fields?

Informix does this nicely:
UNLOAD TO "file"SELECT *FROM tab

Merging COPY and SELECT has some real advantages.  You can specify
columns, parts of a table using WHERE, and even joins.  Very flexible.

Perhaps, if the table name is missing from COPY, we can allow a SELECT:
COPY TO 'file'SELECT *FROM tab

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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: COPY BINARY file format proposal
Next
From: Bruce Momjian
Date:
Subject: Re: RFC C++ Interface