Re: COPY CSV keywords - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: COPY CSV keywords
Date
Msg-id 200404201449.i3KEnYA22335@candle.pha.pa.us
Whole thread Raw
In response to COPY CSV keywords  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Peter Eisentraut wrote:
> >> Bruce Momjian wrote:
> >>> LITERAL - prevent NULL checks for specific columns
> >> 
> >> NO NULL CHECK
> 
> > I considered going this direction, but it broke the WITH clause style of
> > COPY.
> 
> Huh?  Many of the other options are already potentially two words,
> eg QUOTE [AS], so I don't see how you can object to that aspect.

AS was a noise word, while the new keywords would not be.

> I agree with Peter that "LITERAL" is a completely unhelpful name for the
> functionality.

Yep.

> "NO NULL CHECK" seems a bit confusing as well --- at first glance it
> looks like it might mean overriding the column's NOT NULL attribute
> (which I trust is not what it means ;-)).  Perhaps "NO NULLS" ?

Right.  It doesn't affect the constraint.

> Or just "NOT NULL", to avoid introducing another keyword.

Yes, I liked that, but to me it looked like we were saying the column
was NOT NULL, which isn't the meaning.  You could almost call it QUOTE
NULL because it is actually quoting the NULL strings in those columns.

> I liked the "FORCE QUOTE" suggestion, too.

OK.

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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Triggers on system tables
Next
From: Tom Lane
Date:
Subject: Re: COPY CSV keywords