Re: multiline CSV fields

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Ben(dot)Young(at)risk(dot)sungard(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: multiline CSV fields
Date: 2004-11-30 16:05:56
Message-ID: 41AC9A64.4090102@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Ben(dot)Young(at)risk(dot)sungard(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2004-11-30 16:09:15 Re: multiline CSV fields
Previous Message Rod Taylor 2004-11-30 16:03:03 Re: 8.0beta5 results w/ dbt2

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Stark 2004-11-30 16:09:15 Re: multiline CSV fields
Previous Message Ben.Young 2004-11-30 13:26:38 Re: multiline CSV fields