Re: [HACKERS] Trouble with COPY IN

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Trouble with COPY IN
Дата
Msg-id AANLkTincY8oaXCvKL4bmDb3VEOj6oSXY3SHX9BYF=maA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trouble with COPY IN  (Kris Jurka <books@ejurka.com>)
Ответы Re: [HACKERS] Trouble with COPY IN
Список pgsql-jdbc
On Thu, Jul 22, 2010 at 5:34 PM, Kris Jurka <books@ejurka.com> wrote:
> Per discussion and investigation on the -jdbc list, the server appears to
> violate the frontend/backend protocol when binary copy data is sent to the
> server.  Upon receiving the binary copy end of data marker (a -1 field
> count), the server immediately responds with CommandComplete and
> ReadyForQuery without waiting for the frontend to issue CopyDone or
> CopyFail.  This confuses the JDBC driver as it doesn't think the command
> sequence should have finished yet.
>
> 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.
>
> http://www.postgresql.org/docs/8.4/static/protocol-flow.html#PROTOCOL-COPY
> http://www.postgresql.org/docs/8.4/static/sql-copy.html
>
> Kris Jurka

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.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Trouble with COPY IN
Следующее
От: Bryan Montgomery
Дата:
Сообщение: Trying to accomplish SSO from Windows