Re: COPY WITH CSV FORCE QUOTE *

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY WITH CSV FORCE QUOTE *
Date: 2009-07-14 16:31:34
Message-ID: 4A5CB2E6.8040502@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Itagaki Takahiro wrote:
>> Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> wrote:
>>
>>
>>> i can find value for FORCE QUOTE * but what's
>>> the use case for FORCE NOT NULL?
>>>
>
> Oh, sorry. I misread your mail.
> The patch adds * options "FORCE QUOTE" and "FORCE NOT NULL", too.
> Both of * mean all-columns for each options.
>
>

I still don't understand the use case for FORCE NOT NULL *.

FORCE QUOTE * is relatively benign. In particular, it doesn't affect the
null-preserving properties of our CSV implementation, since it still
won't (or shouldn't) quote null values.

FORCE NOT NULL is in any case a fairly blunt instrument - it doesn't
work for a column of any type that doesn't accept an empty string as
valid input, such as numeric types.

I note that this patch was (I think) originally submitted without prior
discussion. That's not following best practice.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2009-07-14 16:56:48 Re: WIP: Deferrable unique constraints
Previous Message Heikki Linnakangas 2009-07-14 16:31:13 Re: [PATCH] "could not reattach to shared memory" on Windows