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

Поиск
Список
Период
Сортировка
От Radosław Smogura
Тема Re: [HACKERS] JDBC and Binary protocol error, for some statements
Дата
Msg-id 00ab501ccdce17220cb85f5c808c22a7@smogura-softworks.eu
обсуждение исходный текст
Ответ на Re: [HACKERS] JDBC and Binary protocol error, for some statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
This what I done is
1. Send bind
2. Put on stack the requested format types
3. On bind complete get requestedFormats from stack.
4. When execute is complete (or portal suspend) then, use requestedFormats
to change the field formats received from describe or previously cached.

I assume server can't change formats after bind, even the describe portal
was fired. Is it all good? I don't know much about server internals.

Kind regards,
Radek.


On Fri, 26 Nov 2010 01:02:25 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Maciek Sakrejda <msakrejda@truviso.com> writes:
>>> 21:43:02.264 (26)  FE=> Describe(statement=S_1)
>> You're still doing the statement-flavor Describe. As Tom pointed out,
>> this won't tell you the result types because it doesn't know them.
>> Actually, technically if you issue a statement-flavor Describe *after*
>> a Bind, the server does have this information, but I'm not surprised
>> that it doesn't send it correctly, since it seems pointless to send
>> the statement variation after already doing a Bind.
>
> In principle you could open more than one Portal off a Statement
> at the same time, so it wouldn't necessarily be well-defined anyway.
>
>             regards, tom lane

--
----------
Radosław Smogura
http://www.softperience.eu

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

Предыдущее
От: Radosław Smogura
Дата:
Сообщение: Re: [HACKERS] JDBC and Binary protocol error, for some statements
Следующее
От: Radosław Smogura
Дата:
Сообщение: Re: Workarounds for getBinaryStream returning ByteArrayInputStream on bytea