Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode
Дата
Msg-id 5317346C.9000501@dunslane.net
обсуждение исходный текст
Ответ на Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode  (Ian Lawrence Barwick <barwick@gmail.com>)
Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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.

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.

cheers

andrew



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Review: Patch FORCE_NULL option for copy COPY in CSV mode
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)