Re: Bug with callable statement and output parameters

From: Kris Jurka <books(at)ejurka(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org, Luis Londono <somakani(at)gmail(dot)com>
Subject: Re: Bug with callable statement and output parameters
Date: 2006-04-26 23:37:01
Message-ID: Pine.BSO.4.63.0604261827560.30145@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Wed, 26 Apr 2006, Dave Cramer wrote:
> I'll try to fix it tonight.

No rush, I've got some other things I'm still looking at.

> If you have any ideas on how to resolve this I'm all ears.
>

1) Require that the number of columns returned is equal to the number of
parameters that the user has called registerOutParameter for.

2) Iterate over the number of parameters ignoring those that haven't been
registered as out paramaters when comparing with the ResultSet.

This will require adding an extra boolean hasBeenRegistered[] array or
inventing an int value that doesn't overlap with any java.sql.Types value
so you can tell what has/has not been registered.

Also I don't know if it is a problem to require a user to register an out
parameter he has no intention of calling a getXXX method on, but that
seems like the only workable solution short of trying to poke into the
system catalogs to find the called function.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Niels Beekman 2006-04-27 07:51:38 Re: XA rollback problem
Previous Message Kris Jurka 2006-04-26 20:51:55 Re: Bug with callable statement and output parameters