X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 014D952806 for ; Thu, 2 Jun 2005 08:28:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55056-05 for ; Thu, 2 Jun 2005 11:28:16 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 8137E52802 for ; Thu, 2 Jun 2005 08:28:15 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ddns2-0002Kk-Cu; Thu, 02 Jun 2005 23:28:18 +1200 Message-ID: <429EED51.5010801@opencloud.com> Date: Thu, 02 Jun 2005 23:28:17 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050324) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dave Cramer Cc: List Subject: Re: modification required to pass Sun's CTS References: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com> <429E2AB3.7080405@opencloud.com> <3E2F1202-C08A-491E-9C47-392022314CC1@fastcrypt.com> <429E6208.4040001@opencloud.com> In-Reply-To: X-Enigmail-Version: 0.90.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/9 X-Sequence-Number: 12971 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