Re: [HACKERS] COPY problems with psql / libpq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] COPY problems with psql / libpq
Date
Msg-id 25103.948407745@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] COPY problems with psql / libpq  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
>> : psql.c doesn't appear to cope correctly with quoted newlines in COPY data;

> What's a quoted newline?
> a) "<newline>"
> b) "\n"
> c) \<newline>

(c).  That's how a newline appearing in the data is supposed to be
represented.  IIRC, I was worried that if the \ falls at the end of
a bufferload and the newline at the start of the next, psql and/or
libpq would fail to recognize the pattern; if so, they'd probably
think the newline is a record boundary.

Patrick could be falling victim to this, but Oliver sez he has no
newlines in his data, so there's at least one other problem.

> that would in any case still point to a problem elsewhere. Gotta pass the
> buck to libpq ...

Could be.  I think Alfred is on the hook here...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: New INSTALL text file
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] timezone problem?