Re: [JDBC] JDBC and Binary protocol error, for some statements

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема Re: [JDBC] JDBC and Binary protocol error, for some statements
Дата
Msg-id AANLkTi=XV9XrKHbmdirxXMU2KaG=0pFV-Hr3KkwwLuss@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [JDBC] JDBC and Binary protocol error, for some statements  (Maciek Sakrejda <msakrejda@truviso.com>)
Список pgsql-hackers
Okay, looking at the JDBC side of things, I think JDBC doesn't
actually need that information (since, it always used text results
before Radosław's patch--the previous binary support was for
parameters only, right?). From looking at QueryExecutorImpl
(specifically sendOneQuery), it's clear that it *does* need the
Describe before the Bind when using named prepared statements. I can't
quite follow why, but I think the upshot of this is that there is no
bug in either the JDBC driver or the backend. This is just a
limitation of the existing implementation in the JDBC driver that
Radosław would need to work around for binary result processing
(probably by storing the requested format somewhere and using that
instead of what comes back from Describe).

I think the lessons are (1) the bug is probably *not* in the
established library or backend code and (2) it's a little confusing
that the result codes for "I don't know what format this will be in"
and "this will be in text format" are aliased.

It's too late to do anything about the second one and it's only a minor quibble.

Thanks for the help in making sense of this.
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Следующее
От: Radosław Smogura
Дата:
Сообщение: Re: [JDBC] JDBC and Binary protocol error, for some statements