Re: COPY with column headings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY with column headings
Дата
Msg-id 14120.1092671390@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: COPY with column headings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: COPY with column headings  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> I certainly think it's worth considering, although I see Tom has 
>> objected :-) . Say we have an option called FIRSTLINELABELS, then on 
>> copy out it would write the headings on the first line, and on copy in 
>> it could just ignore the first line (so it could work symmetrically).

> Yes, that is what I was thinking.  Is this a TODO?  Sure it can be
> misused but most copy options can be similarly misused.

Most copy options will result in obvious failures if misused.  I dislike
this one because of the high risk of silent corruption of your data
(loss of a row or insertion of a row that shouldn't be there).
Considering no one has even made a positive case why we should add it
(for instance, a use-case where it's necessary), I don't think it
belongs in the to-do list.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Jeroen T. Vermeulen"
Дата:
Сообщение: Re: COPY with column headings
Следующее
От: David Fetter
Дата:
Сообщение: HASHes [was Re: Calling PL functions with named parameters]