Re: COPY for CSV documentation

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: COPY for CSV documentation
Date: 2004-04-12 13:41:40
Message-ID: 407A9C94.8010701@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:

>Bruno Wolff III <bruno(at)wolff(dot)to> writes:
>
>
>>On Mon, Apr 12, 2004 at 02:26:14 -0400,
>> Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-04-12 14:30:22 Re: COPY for CSV documentation
Previous Message Tom Lane 2004-04-12 13:34:23 Re: Information/schema hiding...