Re: Idea for making COPY data Microsoft-proof - Mailing list pgsql-hackers

From Philip Warner
Subject Re: Idea for making COPY data Microsoft-proof
Date
Msg-id 3.0.5.32.20020211184759.024b1650@mail.rhyme.com.au
Whole thread Raw
In response to Idea for making COPY data Microsoft-proof  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Idea for making COPY data Microsoft-proof  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 09:22 PM 2/10/02 -0500, Tom Lane wrote:
>
>Comments?  Anyone see a better way?
>

Can you do something akin to what you did with the binary output - but in
this case allow for no details. This would be *great* for column order
problems. eg,
   COPY <table> TO STDOUT WITH HEADER;

or somesuch. This would result in two extra lines at the start:
  <Keywords indocating assumptions and translations (eg. CRLF_TO_LF) etc.  {<col name>...}  ...NORMAL DATA HERE...

Similary,
   COPY <table> FROM STDIN WITH HEADER;

Would use the header to work out how to translate CRLF etc, as well as
allow COPY to be used to load different table definitions.

How does this sound?


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Barry Lind
Date:
Subject: bug with select for update
Next
From: Jean-Michel POURE
Date:
Subject: Fetature enhancement request : use of libgda in PostgreSQL to access legacy databases.