Re: [HACKERS] Trouble with COPY IN

From: Kris Jurka <books(at)ejurka(dot)com>
To: James William Pye <lists(at)jwp(dot)name>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-08-06 23:31:45
Message-ID: alpine.BSO.2.00.1008061927300.17860@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On Wed, 28 Jul 2010, James William Pye wrote:

> Not directly regarding your patch, but while the discussion is in the
> general area. I think it would be wise to throw an error when non-empty
> CopyData messages are received after CopyData(EOF). Chances are that the
> user is making a mistake and should be notified of it.
>

As this is also the direction that Tom Lane indicated we should go, here
is a patch which errors out after receiving any more copy data past the
EOF marker. This also fixes the protocol problem I previously brought up
because the act of checking to see if there is any more data does ensure
that if there isn't any more data in the current buffer, that we wait for
the client to provide CopyDone/Fail.

Kris Jurka

Attachment Content-Type Size
binary-copy-end-v2.patch text/plain 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Itagaki Takahiro 2010-08-07 00:43:16 Re: patch (for 9.1) string functions
Previous Message Robert Haas 2010-08-06 23:29:34 Re: Update hstore % Doc

Browse pgsql-jdbc by date

  From Date Subject
Next Message Adam Rauch 2010-08-06 23:34:25 Re: 9.0 JDBC driver reporting invalid primary key meta data
Previous Message Kris Jurka 2010-08-06 22:06:36 Re: 9.0 JDBC driver reporting invalid primary key meta data