Re: [HACKERS] Unworkable column delimiter characters for COPY

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Unworkable column delimiter characters for COPY
Date: 2007-12-28 17:14:42
Message-ID: 47752F02.3030807@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> I see that we disallow the CSV quote character from appearing in the
> null_print string, but not the escape character. Is this
> correct/sensible?

Yes, because:
. nulls are never quoted
. fields containing the quote char must be quoted
. the escape char is only magical inside quoted fields

> If it is correct, maybe the delimiter could also
> match the escape character?
>
>

Yes, probably. Crazy, but I think it's workable. I'll take that test
out, and just make sure that the delimiter is different from the quote.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-12-28 17:29:26 Re: Selectivity estimation for equality and range queries
Previous Message Tom Lane 2007-12-28 16:37:29 Re: Spoofing as the postmaster

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-12-29 00:04:44 Re: Archiver behavior at shutdown
Previous Message Michael Meskes 2007-12-28 11:31:50 Re: Fix ecpg SQL CONNECT with variable user name