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

Re: [HACKERS] Unworkable column delimiter characters for COPY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Unworkable column delimiter characters for COPY
Date: 2007-12-28 04:25:33
Message-ID: 25251.1198815933@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> It seems we ought to forbid delimiter from matching CSV
>> quote or escape characters.  I'll let you clean up that case though...

> This should do the trick - I'll apply it tomorrow.

A couple thoughts:

* This test needs to appear further down --- it is not sensible until
after you've checked strlen() == 1 for all the strings involved.

* 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?  If it is correct, maybe the delimiter could also
match the escape character?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2007-12-28 10:55:12
Subject: Selectivity estimation for equality and range queries
Previous:From: Andrew DunstanDate: 2007-12-28 04:14:38
Subject: Re: [HACKERS] Unworkable column delimiter characters for COPY

pgsql-patches by date

Next:From: Michael MeskesDate: 2007-12-28 11:31:50
Subject: Re: Fix ecpg SQL CONNECT with variable user name
Previous:From: Andrew DunstanDate: 2007-12-28 04:14:38
Subject: Re: [HACKERS] Unworkable column delimiter characters for COPY

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