Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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.



In response to

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group