Re: Patch: FORCE_NULL option for copy COPY in CSV mode - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Patch: FORCE_NULL option for copy COPY in CSV mode
Date
Msg-id CA+TgmoY1-K1h5YT8S5nP=m27RxcZ6AD1bXgRQBcn33HJRrmA6w@mail.gmail.com
Whole thread Raw
In response to Re: Patch: FORCE_NULL option for copy COPY in CSV mode  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Patch: FORCE_NULL option for copy COPY in CSV mode  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Wed, Oct 9, 2013 at 5:43 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> On 10/09/2013 03:25 PM, Robert Haas wrote:
>> Therefore, a user who wants the opposite of the default behavior -
>> namely, unquoted empty strings as empty strings and quoted empty
>> strings as nulls - should specify both FORCE NULL and FORCE NOT NULL.
>
> Is there a real world example of this case? How common is it? And how come I
> haven't heard of it in the nine or so years since we've been supporting CSV
> import?

I doubt there is any real world use case.  My point is just that FORCE
NULL and FORCE NOT NULL are not opposites, and that will probably
confuse some people.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
Next
From: Andrew Dunstan
Date:
Subject: Re: Patch: FORCE_NULL option for copy COPY in CSV mode