Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9AE199FB262 for ; Fri, 26 Oct 2007 20:25:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 28316-07-2 for ; Fri, 26 Oct 2007 20:25:52 -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 961D09FC925 for ; Fri, 26 Oct 2007 20:25:39 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IlYYZ-0007cJ-CT for pgsql-jdbc@postgresql.org; Fri, 26 Oct 2007 23:25:35 +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 23:25:35 +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 23:25:35 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: Question about refcursors Date: Sat, 27 Oct 2007 01:25:27 +0200 Lines: 28 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; 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 In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/153 X-Sequence-Number: 17725 Kris Jurka wrote on 27.10.2007 01:20: >> 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? >> > > Consider what should be returned by: > > SELECT 1, 'some text', func_returning_refcursor(); > > Or a function returning a refcursor as an out parameter. > > Or a function returning a setof refcursor. > > Just like you don't know exactly what you're executing, neither does the > driver. Makes sense, didn't think about the SELECT usage, as I was thinking about a {call somefunc()} usage Cheers Thomas