Re: Idea for making COPY data Microsoft-proof

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Re: Idea for making COPY data Microsoft-proof
Дата
Msg-id 3.0.5.32.20020212111524.01cdb2f0@mail.rhyme.com.au
обсуждение исходный текст
Ответ на Re: Idea for making COPY data Microsoft-proof  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
At 07:02 PM 2/11/02 -0500, Tom Lane wrote:
>To take just one problem: how do I know that
>the first line is metadata, and not data that happens to look exactly
>like whatever my metadata layout is?

You don't, which is why you need the 'WITH HEADER' or 'WITH ENCODING'
clause on COPY. I guess COPY could issue a warning when you do not say WITH
HEADER and it looks like a valid header. 

Other than that, it's a case of storing information about the dumped data,
not the database schema in the data file. I'm not particularly attached to
the column names being there, but it does seem usefull to store
instructions indicating the the file is formatted.



----------------------------------------------------------------
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 по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: Idea for making COPY data Microsoft-proof
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Idea for making COPY data Microsoft-proof