Re: Idea for making COPY data Microsoft-proof

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Idea for making COPY data Microsoft-proof
Date: 2002-02-11 07:47:59
Message-ID: 3.0.5.32.20020211184759.024b1650@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-11 08:23:41 Fetature enhancement request : use of libgda in PostgreSQL to access legacy databases.
Previous Message Barry Lind 2002-02-11 06:39:29 bug with select for update