Re: COPY with column headings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY with column headings
Дата
Msg-id 16685.1092683053@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: COPY with column headings  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: COPY with column headings  (Andrew Dunstan <andrew@dunslane.net>)
Re: COPY with column headings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> The use case is that it fits in with the way spreadsheets usually do 
> data tables, and many will only allow you to export a whole worksheet 
> (including the heading row) to CSV, not a part of one. Conversely, 
> working with imported data tables will be harder if they lack headings.

Well, if we wanted to *require* a heading row in CSV mode, it would be
relatively foolproof.  What I don't like is the proposal for an
independent option; you've got a 50-50 chance of getting it wrong on
import, and that's too high odds for me.

Next question: are you imagining that the header row will actually have
any semantic significance on input?  Will we check the column names?
Will we be willing to rearrange the columns if the header row claims the
column order is different than the COPY command says?
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: COPY with column headings
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: COPY with column headings