Re: Plan for CSV handling of quotes, NULL

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Plan for CSV handling of quotes, NULL
Дата
Msg-id 407E9980.2020306@dunslane.net
обсуждение исходный текст
Ответ на Plan for CSV handling of quotes, NULL  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Plan for CSV handling of quotes, NULL  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian wrote:

>What about NULL input?  Is my warning and promotion to zero-length
>string for NOT NULL columns OK?
>
>
>


I know I originally floated this idea or one very like it, but I have
become convinced it is not a good idea after all. The user might not
know or expect that the data file has nulls, in which case promoting the
value might not be what s/he expects at all. I think there's a world of
difference between the user saying "I know there might be nulls in this
CSV column - ignore them" and us doing it automagically and issuing a
warning, which might elicit the response "Doh! I wish you'd told me
beforehand." If we provide an option to override handling of nulls on
input per column, then we can safely fail on encountering an unexpected
null, and all the user will have to do would be to rerun the command
with the override. Recovering from an unexpected promotion to non-null
would be a lot harder.

cheers

andrew


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

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: Plan for CSV handling of quotes, NULL
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Plan for CSV handling of quotes, NULL