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 748C552838 for ; Wed, 1 Jun 2005 18:38:04 -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 34025-02 for ; Wed, 1 Jun 2005 21:37:55 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 6F1D752806 for ; Wed, 1 Jun 2005 18:37:53 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.21]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DdauQ-00046v-2P; Thu, 02 Jun 2005 09:37:54 +1200 Message-ID: <429E2AB3.7080405@opencloud.com> Date: Wed, 01 Jun 2005 21:37:55 +0000 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) 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> In-Reply-To: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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/4 X-Sequence-Number: 12966 Dave Cramer wrote: > The cts calls executeUpdate on a function with out parameters. > > I know the API says that executeUpdate is only to be used when no > results are expected, > but this is the way the test is. > > > Any thoughts on changing executeUpdate to allow results to be returned? That's almost certainly the wrong thing to do. executeUpdate is quite specific about throwing exceptions when a resultset is returned. I think the confusion arises from JDBC not considering an OUT parameter to be a "result". i.e. you can have a function with OUT parameters that returns a resultset, but equally you can have one that doesn't return a resultset; and the values in the resultset (if any) are separate to the returned OUT parameter values. Given that the backend OUT parameter support is implemented as a resultset, maybe it makes sense to hide the resultset of a function with OUT parameters entirely, since it's really an implementation artifact? Then executeUpdate shouldn't need changes. Does the CTS have the reverse case, i.e. requiring a function that has both OUT parameters and a resultset? Seems like that'd be hard to support at all with the current scheme.. -O