Re: COPY for CSV documentation - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: COPY for CSV documentation
Date
Msg-id 407A9C94.8010701@dunslane.net
Whole thread Raw
In response to Re: COPY for CSV documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: COPY for CSV documentation
List pgsql-patches
Tom Lane wrote:

>Bruno Wolff III <bruno@wolff.to> writes:
>
>
>>On Mon, Apr 12, 2004 at 02:26:14 -0400,
>>  Andrew Dunstan <andrew@dunslane.net> wrote:
>>
>>
>>>a few points:
>>>. in CSV mode, NULL should default to '' - that was in what I sent in.
>>>
>>>
>
>
>
>>Postgres normally treats an empty string as an empty string. Are you sure
>>you really want it to be treated as a NULL by default in this one place?
>>
>>
>
>I think that's a spectacularly bad idea too.  People who really want
>that can write "NULL ''", but it shouldn't be implied by CSV mode.
>
>
>

Spectacularly? Hmm.

My approach was that the default should be the most common case. Perhaps
on import it's a tossup, but on export a CSV containing lots of \N cells
is likely to be ... unexpected.

But, honestly, it's not worth dying in a ditch over.

cheers

andrew

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: COPY for CSV documentation
Next
From: Bruce Momjian
Date:
Subject: Re: COPY for CSV documentation