pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: Bug with callable statement and output parameters
Date: Tue, 23 May 2006 15:30:49 -0500 (EST)
Message-ID: <Pine.BSO.4.63.0605231511360.2928@leary2.csoft.net> (raw)
In-Reply-To: <Pine.BSO.4.63.0605231429580.2928@leary2.csoft.net>
References: <3f205b320604201502o112f68abhafbc0a2e0a845218@mail.gmail.com>
	<3f205b320604201703x2d5a52c7s214a039e36539a8a@mail.gmail.com>
	<DB439E45-9AF2-4EC9-8215-4A83DFE31A52@fastcrypt.com>
	<Pine.BSO.4.63.0604261551120.31984@leary2.csoft.net>
	<D65A5222-DACA-4BBC-97E0-C3D4BAAB2525@fastcrypt.com>
	<Pine.BSO.4.63.0604261827560.30145@leary2.csoft.net>
	<B8BAE173-D49A-4C20-82A9-6DA0950F4CF9@fastcrypt.com>
	<Pine.BSO.4.63.0604272109340.9036@leary2.csoft.net>
	<A137FA2D-7A4A-4385-8B6D-3B28E56AA0EE@fastcrypt.com>
	<Pine.BSO.4.63.0605032353450.1408@leary2.csoft.net>
	<2FAEA9A5-D1E5-4FEF-B464-46C730E6F356@fastcrypt.com>
	<Pine.BSO.4.63.0605101951250.386@leary2.csoft.net>
	<9726A637-9B48-426F-91A9-E1CBB6F1265B@fastcrypt.com>
	<Pine.BSO.4.63.0605102204330.10863@leary2.csoft.net>
	<0BEEAF9A-2E47-4E4F-AE8D-2846076FA037@fastcrypt.com>
	<Pine.BSO.4.63.0605220453380.22770@leary2.csoft.net>
	<Pine.BSO.4.63.0605231429580.2928@leary2.csoft.net>



On Tue, 23 May 2006, Kris Jurka wrote:

>> On Sun, 21 May 2006, Dave Cramer wrote:
>> 
>>> Attached is a patch that works on 8.1 and 7.3 for sure
>>> 
>
> Unfortunately it does not work when run against a 8.0 server.
>

The issues is that every function call will have at least one out 
parameter whether it's been registered or not.  For pre 8.1 servers 
using the v3 protocol the out parameter was not being registered in the 
SimpleParameterList and can't be because of lack of server support. 
The patch adjusts getOutParameterCount to return at least 1.

I need to do some more careful testing after the recent bad releases, but 
hopefully I'll put out new 8.0 and 8.1 releases tonight.

Kris Jurka

Attachments:

out-params-pre81-v3.patch (text/plain, 711B) download Index: org/postgresql/core/v3/SimpleParameterList.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/core/v3/SimpleParameterList.java,v retrieving revision 1.12 diff -c -r1.12 SimpleParameterList.java *** org/postgresql/core/v3/SimpleParameterList.java 22 May 2006 09:52:37 -0000 1.12 --- org/postgresql/core/v3/SimpleParameterList.java 23 May 2006 20:25:08 -0000 *************** *** 81,86 **** --- 81,89 ---- count++; } } + // Every function has at least one output. + if (count == 0) + count = 1; return count; }

view thread (21+ messages)  latest in thread

Message-ID: <Pine.BSO.4.63.0605231511360.2928@leary2.csoft.net>
Permalink:  ../Pine.BSO.4.63.0605231511360.2928@leary2.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.63.0605231511360.2928@leary2.csoft.net

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: books@ejurka.com, pg@fastcrypt.com
  Subject: Re: Bug with callable statement and output parameters
  In-Reply-To: <Pine.BSO.4.63.0605231511360.2928@leary2.csoft.net>
  References: <3f205b320604201502o112f68abhafbc0a2e0a845218@mail.gmail.com> <3f205b320604201703x2d5a52c7s214a039e36539a8a@mail.gmail.com> <DB439E45-9AF2-4EC9-8215-4A83DFE31A52@fastcrypt.com> <Pine.BSO.4.63.0604261551120.31984@leary2.csoft.net> <D65A5222-DACA-4BBC-97E0-C3D4BAAB2525@fastcrypt.com> <Pine.BSO.4.63.0604261827560.30145@leary2.csoft.net> <B8BAE173-D49A-4C20-82A9-6DA0950F4CF9@fastcrypt.com> <Pine.BSO.4.63.0604272109340.9036@leary2.csoft.net> <A137FA2D-7A4A-4385-8B6D-3B28E56AA0EE@fastcrypt.com> <Pine.BSO.4.63.0605032353450.1408@leary2.csoft.net> <2FAEA9A5-D1E5-4FEF-B464-46C730E6F356@fastcrypt.com> <Pine.BSO.4.63.0605101951250.386@leary2.csoft.net> <9726A637-9B48-426F-91A9-E1CBB6F1265B@fastcrypt.com> <Pine.BSO.4.63.0605102204330.10863@leary2.csoft.net> <0BEEAF9A-2E47-4E4F-AE8D-2846076FA037@fastcrypt.com> <Pine.BSO.4.63.0605220453380.22770@leary2.csoft.net> <Pine.BSO.4.63.0605231429580.2928@leary2.csoft.net> <Pine.BSO.4.63.0605231511360.2928@leary2.csoft.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox