Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

Next:From: Greg StarkDate: 2004-11-30 16:09:15
Subject: Re: multiline CSV fields
Previous:From: Ben.YoungDate: 2004-11-30 13:26:38
Subject: Re: multiline CSV fields

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group