X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 16DB711F68CC for ; Wed, 26 Apr 2006 20:37:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 94741-05 for ; Wed, 26 Apr 2006 20:37:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 15CA211F6832 for ; Wed, 26 Apr 2006 20:37:01 -0300 (ADT) Received: (qmail 8597 invoked by uid 1112); 26 Apr 2006 23:37:01 -0000 Date: Wed, 26 Apr 2006 18:37:01 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Dave Cramer cc: pgsql-jdbc@postgresql.org, Luis Londono Subject: Re: Bug with callable statement and output parameters In-Reply-To: Message-ID: References: <3f205b320604201502o112f68abhafbc0a2e0a845218@mail.gmail.com> <3f205b320604201703x2d5a52c7s214a039e36539a8a@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/163 X-Sequence-Number: 15097 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