From: Oliver Jowett <oliver@opencloud.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: modification required to pass Sun's CTS
Date: Thu, 02 Jun 2005 23:28:17 +1200
Message-ID: <429EED51.5010801@opencloud.com> (raw)
In-Reply-To: <A89FA054-9913-40B6-BEED-036FB7F4475D@fastcrypt.com>
References: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com>
<429E2AB3.7080405@opencloud.com>
<3E2F1202-C08A-491E-9C47-392022314CC1@fastcrypt.com>
<429E6208.4040001@opencloud.com>
<A89FA054-9913-40B6-BEED-036FB7F4475D@fastcrypt.com>
Dave Cramer wrote:
> OK, so if I understand this correctly, we allow the OUT parameter
> result set if it is a callablestatement ?
No. I guess I'm not being clear.
If you have a function that does not return anything, but has OUT
parameters, then CallableStatement.executeUpdate() should succeed and
CallableStatement.executeQuery() should fail. That is, the fact that we
use a SELECT to get at the OUT parameters is an *implementation detail*
-- from the point of view of the JDBC {call} escape, the function is
*not* returning a resultset.
So the driver's implementation of OUT parameters should also make sure
to suppress the resultset generated by the SELECT. From the point of
view of the JDBC client, execution of the {call} escape *does not return
a resultset*. That means that executeUpdate() doesn't complain about it,
and executeQuery() *does* complain about it, and you can't get access to
any resultset via getResultSet() etc. If you want to get the OUT
values, you use the appropriate parameter-getting methods on
CallableStatement.
> I don't think we can actually return two resultsets ie one for the out
> parameters, and yet another if the function returns a resultset. I
> don't believe the
> backend has this facility.
Yes, that's what I said in my earlier email.
-O
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: oliver@opencloud.com, pg@fastcrypt.com
Subject: Re: modification required to pass Sun's CTS
In-Reply-To: <429EED51.5010801@opencloud.com>
References: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com> <429E2AB3.7080405@opencloud.com> <3E2F1202-C08A-491E-9C47-392022314CC1@fastcrypt.com> <429E6208.4040001@opencloud.com> <A89FA054-9913-40B6-BEED-036FB7F4475D@fastcrypt.com> <429EED51.5010801@opencloud.com>
* 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