Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8AA1A9FB273 for ; Fri, 26 Oct 2007 19:56:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 95056-05-2 for ; Fri, 26 Oct 2007 19:55:57 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 0C5509FC955 for ; Fri, 26 Oct 2007 19:55:49 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IlY5j-0003Uo-KC for pgsql-jdbc@postgresql.org; Fri, 26 Oct 2007 22:55:47 +0000 Received: from ppp-82-135-15-151.dynamic.mnet-online.de ([82.135.15.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Oct 2007 22:55:47 +0000 Received: from spam_eater by ppp-82-135-15-151.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Oct 2007 22:55:47 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Question about refcursors Date: Sat, 27 Oct 2007 00:55:35 +0200 Lines: 31 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-82-135-15-151.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/151 X-Sequence-Number: 17723 Hi, I'm trying to add support for refcursors in my JDBC tool and while trying out the examples in the docs () I stumbled over something where I'm not sure whether this is intended or simply something which was never thought of. My generic code to call the procedure does basically a prepareCall() (but not with the "? =" as I cannot distinguish between a function and a procedure at that moment. And it seems to be working. Now after running the procedure (using execute()) I'm (generically) calling getResultSet() on the statement object. And indeed the driver does return a ResultSet, but it seems that the actual result of the call is "hidden" inside one of the columns of the resultset. If I do a getObject() on that resultset I get another result set which indeed is the result of my SELECT in the procedure. My question: is there a reason why the "real" result cannot be obtained using getResultSet() but is wrapped into another ResultSet? I can check the database to find out if a function or a procedure is called, but it would be really cool, if the driver could handle that for me. I am aware that I'm not using the calls 100% according to the API and the documentation, but still :) Cheers Thomas