Re: CSV patch applied - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: CSV patch applied
Date
Msg-id 200404201541.i3KFf9S12748@candle.pha.pa.us
Whole thread Raw
In response to Re: CSV patch applied  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-patches
Fabien COELHO wrote:
>
> > >>        CSV - enable CSV mode
> > >>        QUOTE - specify quote character
> > >>        ESCAPE - specify escape character
> > >>        FORCE - force quoting of specified columns
> > >
> > >FORCE QUOTE
>
> QUOTING col1,col2?
> QUOTED col1,col2?
> IN QUOTES col1,cold
>
> > >>        LITERAL - prevent NULL checks for specific columns
> > >
> > >NO NULL CHECK
>
> QUOTED (meaning 'as quoted')?
>
> From a language design point of view, I think it may be better to stick
> to one word versions?

I understand, and we tried that.  The confusion is that FORCE forces
quotes on non-NULL values, while LITERAL forces quotes on NULL values,
so while both deal with quoting, their functionality is different for
input and output.  They same single keyword just seemed confusing.

This is why the two-keyword idea sounds good to me --- we use the word
QUOTE (already a keyword), and then say FORCE for output, and NULL for
input:

    FORCE QUOTE
    QUOTE NULL

--
  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: Fabien COELHO
Date:
Subject: Re: CSV patch applied
Next
From: Rod Taylor
Date:
Subject: NEXT VALUE FOR...