Re: How to insert Ecoded values into postrgresql - Mailing list pgsql-general

From Merlin Moncure
Subject Re: How to insert Ecoded values into postrgresql
Date
Msg-id x2yb42b73151004190946y7530a652pc7c4dac0e2d7bde5@mail.gmail.com
Whole thread Raw
In response to Re: How to insert Ecoded values into postrgresql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How to insert Ecoded values into postrgresql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, Apr 15, 2010 at 12:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> Merlin Moncure wrote:
>>> aside: anyone know if postgres properly handles csv according to rfc4180?
>
>> Wow, I had no idea there was an RFC for CSV.
>
> Me either.  I'd bet the percentage of "CSV"-using programs that actually
> conform to the RFC is very small anyway; so while it might be smart to
> make sure that what we *emit* follows the RFC, it's probably useless as
> a guide to what we need to *accept*.

I took a quick look at the rfc.  It's very short and appears to codify
common practices.  We follow it for both input and output except:

*) trailing spaces are supposed to preserved.  we follow sql rules on
trailing spaces which I think makes this point moot.

*) csv is supposed to be CRLF *always*.  We do not do this.  We do
however read different types of newlines.  So we are a 4180 reader but
not an emitter.  Not so sure if I think changing this is a good idea
though without exposing a knob.

merlin

pgsql-general by date:

Previous
From: Leonardo F
Date:
Subject: performance problems inserting random vals in index
Next
From: Vasiliy G Tolstov
Date:
Subject: Re: best solution to backup full user databse