Re: Plan for CSV handling of quotes, NULL - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: Plan for CSV handling of quotes, NULL
Date
Msg-id 200404160234.i3G2Yw019095@candle.pha.pa.us
Whole thread Raw
In response to Re: Plan for CSV handling of quotes, NULL  (Richard Huxton <richardh@archonet.com>)
Responses Re: Plan for CSV handling of quotes, NULL
List 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Plan for CSV handling of quotes, NULL
Next
From: Bruce Momjian
Date:
Subject: Re: Plan for CSV handling of quotes, NULL