Re: Plan for CSV handling of quotes, NULL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Richard Huxton <richardh(at)archonet(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Plan for CSV handling of quotes, NULL
Date: 2004-04-16 02:34:58
Message-ID: 200404160234.i3G2Yw019095@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Richard Huxton wrote:
> On Thursday 15 April 2004 15:58, Bruce Momjian wrote:
> >
> > OK, so we need a list of columns for output with quotes, and a list of
> > columns where NULL should be changed to zero-length strings.
> >
> > How about if we use FORCE to force quotes on output, and CONVERT to
> > convert null to zero-length strings on input?
>
> How about FORCEQUOTES and NULLTOBLANK which tells you what they will do?

Yea, I am trying to decide keywords now. I have the code compiling and
working and will post shortly.

I used FORCE for the force-quotes capability. Talking to Andrew, he
suggests instead of force to blanks, just ignore the NULL specification
(usually blank for CSV), so I though of using LITERAL, but that seems
wrong. I am looking for suggestions on working. Ideally it would be
something that suggests the NULL specification test is skiped for that
column.

--
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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-04-16 04:21:12 Re: Plan for CSV handling of quotes, NULL
Previous Message Richard Huxton 2004-04-16 00:00:33 Re: Plan for CSV handling of quotes, NULL