Re: Plan for CSV handling of quotes, NULL

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Plan for CSV handling of quotes, NULL
Date: 2004-04-15 14:29:01
Message-ID: 407E9C2D.5060003@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian wrote:

>Andrew Dunstan wrote:
>
>
>>Bruce Momjian said:
>>
>>
>>>Andrew Dunstan wrote:
>>>
>>>
>>>>copy mytable to 'mydata.csv' csv force zipcode;
>>>>
>>>>seems OK to me. I'm all in favor of low-tecH solutions where
>>>>appropriate. ;-)
>>>>
>>>>
>>>Could we have FORCE just force quotes on all values, rather than
>>>allowing a list of columns to be specified? Seems if you have a
>>>strange zipcode field, it would be easier to just do them all.
>>>
>>>
>>>
>>Then dates and numbers would be wrong. No all or nothing switch will work.
>>
>>
>
>OK, I will start coding. So FORCE col1, col2 will force quotes on those
>two columns, right?
>
>
>

That's what I was thinking. You would just have it as an array of
booleans indexed by attnum-1 and use it as part of the expression that
sets force_quote.

cheers

andrew

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-04-15 14:58:31 Re: Plan for CSV handling of quotes, NULL
Previous Message Andrew Dunstan 2004-04-15 14:17:36 Re: Plan for CSV handling of quotes, NULL