Re: multiline CSV fields

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: multiline CSV fields
Дата
Msg-id 41AC9A64.4090102@dunslane.net
обсуждение исходный текст
Ответ на Re: multiline CSV fields  (Ben.Young@risk.sungard.com)
Список pgsql-hackers

Ben.Young@risk.sungard.com wrote:

>
>I am normally more of a lurker on these lists, but I thought you had 
>better know 
>that when we developed CSV import/export for an application at my last 
>company
>we discovered that Excel can't always even read the CSV that _it_ has 
>output! 
>(With embedded newlines a particular problem) 
>  
>


Quite so.  This is not about being perfect, and there will be failures. 
But, absent this problem the feature should work reasonably well.

Note that Excel is not the only kid on the block - if it were there 
would be a good case for avoiding CSV anyway and instead reading/writing 
the excel files directly. We included support for CSVs because, 
nothwithstanding how braindead the format is, is is still widely used in 
data exchange.

>It is far more reliable if you output your data as an HTML table, in which 
>case it 
>practically always gets it right. Perhaps Postgres could support this as 
>an import/
>export mechanism as I have found it to be far less error prone than CSV?
>  
>

That's probably possibly but rather ugly. A well defined XML format 
would be far better (don't we have something like that in contrib?). 
Things for a bulk-export facility, I think.

cheers

andrew




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.0beta5 results w/ dbt2
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: 8.0beta5 results w/ dbt2