Re: How to insert Ecoded values into postrgresql

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, venkat <ven(dot)tammineni(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to insert Ecoded values into postrgresql
Date: 2010-04-19 16:46:41
Message-ID: x2yb42b73151004190946y7530a652pc7c4dac0e2d7bde5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 15, 2010 at 12:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bruce Momjian <bruce(at)momjian(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vasiliy G Tolstov 2010-04-19 16:58:42 Re: best solution to backup full user databse
Previous Message Leonardo F 2010-04-19 16:30:05 performance problems inserting random vals in index