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

Re: [HACKERS] Trouble with COPY IN

From: Kris Jurka <books(at)ejurka(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
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:23:55
Message-ID: alpine.BSO.2.00.1007222112070.29831@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-jdbc

On Thu, 22 Jul 2010, Robert Haas wrote:

> On Thu, Jul 22, 2010 at 5:34 PM, Kris Jurka <books(at)ejurka(dot)com> wrote:
>>
>> 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 guess the obvious question is whether we shouldn't instead change
> the docs to match the behavior.  I suspect there's almost no chance
> we'd consider back-patching a change of this type, since it is a clear
> behavior change.  And even if we did, there would still be people
> running servers with the old behavior with which JDBC and other
> drivers would have to cope.  Having two different behaviors might be
> worse than the status quo.
>

It is a clear behavior change, but that's what bug fixes are.  I would 
advocate back-patching this because I doubt many people would be affected 
by this change and I think it would be awkward trying to document how 
things work differently in binary mode when sending a file end marker than 
in text mode or without a file end marker.  If this was fixed server side 
and backpatched, I would not modify the JDBC driver to work with older 
server versions.

The copy documentation is clear that you must call PQputCopyEnd or 
equivalent to end the copy sequence, so this would only affect people who 
are not doing that and using binary copy mode.  I doubt many people are 
using binary copy at all because of the additional difficulty in 
generating binary format data and the potential for portability problems.

Kris Jurka

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2010-07-23 13:32:08
Subject: Re: [HACKERS] Trouble with COPY IN
Previous:From: David ChristensenDate: 2010-07-23 13:05:37
Subject: Re: Patch for 9.1: initdb -C option

pgsql-jdbc by date

Next:From: Andrew DunstanDate: 2010-07-23 13:32:08
Subject: Re: [HACKERS] Trouble with COPY IN
Previous:From: LewDate: 2010-07-23 12:48:18
Subject: Re: JPA and desktop apps

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