Re: [HACKERS] Trouble with COPY IN - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: [HACKERS] Trouble with COPY IN
Date
Msg-id 4C499E26.4060307@ejurka.com
Whole thread Raw
In response to Re: [HACKERS] Trouble with COPY IN  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Trouble with COPY IN
List pgsql-jdbc
On 7/23/2010 6:40 AM, Tom Lane wrote:
> Kris Jurka<books@ejurka.com>  writes:
>> Attached is a patch to make the server continue to consume protocol data
>> until instructed to stop by the client in the same way as copying text
>> data to the server currently works.
>
> I believe this is a misunderstanding of the protocol spec.  The spec is
> (intended to say that) we'll continue to accept data after reporting an
> error, not that we will silently swallow an incorrect data stream and
> not complain about it.  Which is what this patch will do.
>

All this does is make binary mode match text mode.  Are you planning on
changing text mode to match binary mode instead?  Currently text mode
parsing ends at the data end marker (\.) and throws away any further
data which may or may not be ill formatted.  For example there's no
complaint about copying the following data file into a single column
integer table even though there is bogus data after the file end marker

3
4
\.
asdf
aff
5
qq

Kris Jurka



pgsql-jdbc by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Trouble with COPY IN
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Trouble with COPY IN