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

From Michael Paquier
Subject Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode
Date
Msg-id CAB7nPqTjFZBS7kvAPsVVN4-CeRQurfXXXQgVrQo8RuvybndUNA@mail.gmail.com
Whole thread Raw
In response to Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode
Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode
List pgsql-hackers
On Wed, Mar 5, 2014 at 7:44 AM, Andrew Dunstan <andrew@dunslane.net> wrote:
> I have picked this up and committed the patch. Thanks to all.
Sorry for coming after the battle, but while looking at what has been
committed I noticed that copy2.sql is actually doing twice in a row
the same test:
COPY forcetest (a, b, c) FROM STDIN WITH (FORMAT csv,
FORCE_NOT_NULL(b), FORCE_NULL(c));
1,,""
\.
-- should succeed with no effect ("b" remains an empty string, "c" remains NULL)
COPY forcetest (a, b, c) FROM STDIN WITH (FORMAT csv,
FORCE_NOT_NULL(b), FORCE_NULL(c));
2,,""
\.

See? For both tests the quotes are placed on the same column, the 3rd.
I think that one of them should be like that, with the quotes on the
2nd column => 2,"",
The attached patch corrects that... and a misplaced comment.
Regards,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: ALTER TABLE lock strength reduction patch is unsafe
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot standby doesn't come up on some situation.