Re: allow CSV quote in NULL

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Stephen Frost" <sfrost(at)snowman(dot)net>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: allow CSV quote in NULL
Date: 2007-07-27 09:22:42
Message-ID: 87vec6p5el.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>> Please find attached a minor patch to remove the constraints that a
>> user can't include the delimiter or quote characters in a 'NULL AS'
>> string when importing CSV files.
>
> This can't really be sane can it?

Including unquoted delimiter characters seems kind of insane. But including
the quote characters or quoted delimiter characters seems reasonable.

The alternative would be interpreting NULL strings after dequoting but that
would leave no way to include the NULL string literally. This solution means
there's no way to include it (if it needs quoting) but only when you specify
it this way.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2007-07-27 11:38:47 Re: allow CSV quote in NULL
Previous Message Dave Page 2007-07-27 09:15:38 Re: stats_block_level

Browse pgsql-patches by date

  From Date Subject
Next Message Stephen Frost 2007-07-27 11:38:47 Re: allow CSV quote in NULL
Previous Message Stephen Frost 2007-07-27 05:03:27 Re: allow CSV quote in NULL