Re: [HACKERS] Trouble with COPY IN

From: Kris Jurka <books(at)ejurka(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Matthew Wakeling <matthew(at)flymine(dot)org>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Maciek Sakrejda <msakrejda(at)truviso(dot)com>, Samuel Gendler <sgendler(at)ideasculptor(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [HACKERS] Trouble with COPY IN
Date: 2010-07-23 13:50:30
Message-ID: 4C499E26.4060307@ejurka.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On 7/23/2010 6:40 AM, Tom Lane wrote:
> Kris Jurka<books(at)ejurka(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-07-23 13:51:51 Re: Patch for 9.1: initdb -C option
Previous Message Robert Haas 2010-07-23 13:40:37 Re: [HACKERS] Trouble with COPY IN

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2010-07-23 14:11:36 Re: [HACKERS] Trouble with COPY IN
Previous Message Robert Haas 2010-07-23 13:40:37 Re: [HACKERS] Trouble with COPY IN