From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Question about refcursors
Date: Sat, 27 Oct 2007 01:25:27 +0200
Message-ID: <fftt17$3ah$1@ger.gmane.org> (raw)
In-Reply-To: <Pine.BSO.4.64.0710261917500.19968@leary.csoft.net>
References: <fftr98$uhk$1@ger.gmane.org>
<Pine.BSO.4.64.0710261917500.19968@leary.csoft.net>
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
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: spam_eater@gmx.net
Subject: Re: Question about refcursors
In-Reply-To: <fftt17$3ah$1@ger.gmane.org>
References: <fftr98$uhk$1@ger.gmane.org> <Pine.BSO.4.64.0710261917500.19968@leary.csoft.net> <fftt17$3ah$1@ger.gmane.org>
* 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