From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Bruno Wolff III <bruno(at)wolff(dot)to> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: COPY for CSV documentation |
Date: | 2004-04-12 15:18:14 |
Message-ID: | 200404121518.i3CFIEQ22929@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Bruno Wolff III wrote:
> On Mon, Apr 12, 2004 at 10:30:22 -0400,
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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.
I am thinking we could enable this NULL handling by default, and allow
it to be over-ridden with the NULL keyword.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2004-04-12 15:19:32 | Re: COPY for CSV documentation |
Previous Message | Bruno Wolff III | 2004-04-12 15:07:13 | Re: COPY for CSV documentation |