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

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Patch: FORCE_NULL option for copy COPY in CSV mode
Дата
Msg-id 5256A870.5000303@dunslane.net
обсуждение исходный текст
Ответ на Re: Patch: FORCE_NULL option for copy COPY in CSV mode  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Patch: FORCE_NULL option for copy COPY in CSV mode  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On 10/09/2013 11:47 PM, Amit Kapila wrote:
>
>     One of the advantage, I could see using "NULL For .." syntax is
> that already we have one syntax with which user can specify what
> strings can be replaced with NULL, now just to handle quoted empty
> string why to add different syntax.
>
> "FORCE_NULL" has advantage that it can be used for some columns rather
> than all columns, but I think for that existing syntax can also be
> modified to support it.
>
>
>


I think it's badly designed  on its face. We don't need and shouldn't 
provide a facility for different NULL markers. A general facility for 
that would be an ugly an quite pointless addition to code complexity. 
What we need is simply a way of altering one specific behaviour, namely 
the treatment of quoted NULL markers. We should not do that by allowing 
munging the NULL marker per column, but by a syntactical mechanism that 
directly addresses the change in behaviour. If you don't like "FORCE 
NULL" then let's pick something else, but not this ugly and unnecessary 
"NULL FOR" gadget.

cheers

andrew



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: space reserved for WAL record does not match what was written: panic on windows
Следующее
От: Andres Freund
Дата:
Сообщение: Re: space reserved for WAL record does not match what was written: panic on windows