Re: [PATCHES] allow CSV quote in NULL

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Gregory Stark <stark(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] allow CSV quote in NULL
Date: 2007-07-31 18:52:39
Message-ID: 20070731185239.GP4887@tamriel.snowman.net
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) wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > ... Oh, and if we did allow the
> > quote char we should surely only allow it on input - just because other
> > programs produce absurd output there is not reason we should.
>
> Yeah. The *real* problem with the patch as proposed is that it allows a
> COPY OUT to emit a file that cannot be reloaded correctly, even given
> the same options used to prepare it. I think that the restrictions were
> put there more to prevent that scenario than to restrict COPY IN.

erp. My apologies, I hadn't ever intended for this to be used with COPY
OUT. For some reason I had thought my changes were isolated to the COPY
CSV IN path. I'd be happy to adjust the patch to only accept the
quote-in-null syntax when doing a COPY CSV IN.

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-07-31 19:06:35 Re: stats_block_level
Previous Message Greg Smith 2007-07-31 18:51:03 Re: Machine available for community use

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-07-31 19:09:56 Re: Export user visible function to make use of convert_to_scalar
Previous Message Tom Lane 2007-07-31 17:31:06 Re: Export user visible function to make use of convert_to_scalar