Re: Ragged CSV import

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Ragged CSV import
Дата
Msg-id 6369.1252527236@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Ragged CSV import  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Ragged CSV import  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Ragged CSV import  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Ragged CSV import  (Andrew Dunstan <andrew@dunslane.net>)
Re: Ragged CSV import  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> I have received a requirement for the ability to import ragged CSV 
> files, i.e. files that contain variable numbers of columns per row. The 
> requirement is that extra columns would be ignored and missing columns 
> filled with NULL. The client wanting this has wrestled with some 
> preprocessors to try to get what they want, but they would feel happier 
> with this built in. This isn't the first time I have received this 
> request since we implemented CSV import. People have complained on 
> numerous occasions about the strictness of the import routines w.r.t. 
> the number of columns.

Hmm.  Accepting too few columns and filling with nulls isn't any
different than what INSERT has always done.  But ignoring extra columns
seems like a different ballgame.  Can you talk your client out of that
one?  It just seems like a bad idea.

As for the "numerous occasions", maybe I've not been paying attention,
but I don't recall any ...
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Ragged CSV import
Следующее
От: Ľubomír Varga
Дата:
Сообщение: Re: suggestion to improve planer