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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-jdbc by date

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