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

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

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Maciek Sakrejda <msakrejda(at)truviso(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: [JDBC] JDBC and Binary protocol error, for some statements
Date: 2010-11-26 09:01:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-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,

On Fri, 26 Nov 2010 01:02:25 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Maciek Sakrejda <msakrejda(at)truviso(dot)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

In response to

pgsql-hackers by date

Next:From: Itagaki TakahiroDate: 2010-11-26 10:28:14
Subject: Re: memory leak in libxml2 - fix
Previous:From: Pavel StehuleDate: 2010-11-26 08:59:24
Subject: memory leak in libxml2 - fix

pgsql-jdbc by date

Next:From: Radosław SmoguraDate: 2010-11-26 12:05:30
Subject: Re: Workarounds for getBinaryStream returning ByteArrayInputStream on bytea
Previous:From: Radosław SmoguraDate: 2010-11-26 07:37:39
Subject: Re: [JDBC] JDBC and Binary protocol error, for some statements

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