Re: COPY for CSV documentation

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: COPY for CSV documentation
Дата
Msg-id 20040412150713.GA21359@wolff.to
обсуждение исходный текст
Ответ на Re: COPY for CSV documentation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: COPY for CSV documentation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
On Mon, Apr 12, 2004 at 10:30:22 -0400,
  Bruce Momjian <pgman@candle.pha.pa.us> wrote:
>
> It is my understanding that \N is a valid column value (no backslash
> escape in CSV, right?), so we can't use it for NULL.
> The only thing I can think of is for NULL to be:
>
>     ,,
>
> (no quotes) and a zero-length string to be:
>
>     ,"",
>
> How do most applications handle those two cases?  If they accept either,
> can we use that so we can read our own CSV files without losing the NULL
> specification?

I think the above are going to be treated as equvialent by most CSV parsers.

There doesn't seem to be a standard for CSV. From what I found describing
it, there isn't any feature for distinguishing NULLs from empty strings.
So whatever gets done is going to be application specific.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: COPY for CSV documentation
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: COPY for CSV documentation