From: | Ian Lawrence Barwick <barwick(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Payal Singh <payal(at)omniti(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode |
Date: | 2014-03-05 14:37:18 |
Message-ID: | CAB8KJ=iOTV3-VmYCGX0wFj2eEDXza7so-LvaKTJRFffd5vxwfg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2014-03-05 23:27 GMT+09:00 Andrew Dunstan <andrew(at)dunslane(dot)net>:
>
> On 03/05/2014 09:11 AM, Michael Paquier wrote:
>>
>> After testing this feature, I noticed that FORCE_NULL and
>> FORCE_NOT_NULL can both be specified with COPY on the same column.
>> This does not seem correct. The attached patch adds some more error
>> handling, and a regression test case for that.
>>
>
>
> Strictly they are not actually contradictory, since FORCE NULL relates to
> quoted null strings and FORCE NOT NULL relates to unquoted null strings.
> Arguably the docs are slightly loose on this point. Still, applying both
> FORCE NULL and FORCE NOT NULL to the same column would be rather perverse,
> since it would result in a quoted null string becoming null and an unquoted
> null string becoming not null.
Too frazzled to recall clearly right now, but I think that was the somewhat
counterintuitive conclusion I originally came to.
> I'd be more inclined just to tighten the docs and maybe expand the
> regression tests a bit, but I could be persuaded the other way if people
> think it's worth it.
Might be worth doing if it's an essentially useless feature, if only to
preempt an unending chain of bug reports.
Many thanks for everyone's input on this, and apologies for not giving
the patch enough rigorous attention.
Regards
Ian Barwick
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2014-03-05 14:39:57 | Re: jsonb and nested hstore |
Previous Message | Florian Pflug | 2014-03-05 14:35:53 | Re: [PATCH] Negative Transition Aggregate Functions (WIP) |