Re: multiline CSV fields

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: multiline CSV fields
Дата
Msg-id 10498.1100200819@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: multiline CSV fields  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: multiline CSV fields  (Andrew Dunstan <andrew@dunslane.net>)
Re: multiline CSV fields  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Patrick B Kelly wrote:
>> Actually, when I try to export a sheet with multi-line cells from 
>> excel, it tells me that this feature is incompatible with the CSV 
>> format and will not include them in the CSV file.

> It probably depends on the version. I have just tested with Excel 2000 
> on a WinXP machine and it both read and wrote these files.

I'd be inclined to define Excel 2000 as broken, honestly, if it's
writing unescaped newlines as data.  To support this would mean throwing
away most of our ability to detect incorrectly formatted CSV files.
A simple error like a missing close quote would look to the machine like
the rest of the file is a single long data line where all the newlines
are embedded in data fields.  How likely is it that you'll get a useful
error message out of that?  Most likely the error message would point to
the end of the file, or at least someplace well removed from the actual
mistake.

I would vote in favor of removing the current code that attempts to
support unquoted newlines, and waiting to see if there are complaints.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: newbie compile question. please help
Следующее
От: Tom Lane
Дата:
Сообщение: Re: MAX/MIN optimization via rewrite (plus query rewrites generally)