pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Wed, 01 Jun 2005 21:37:55 +0000
Message-ID: <429E2AB3.7080405@opencloud.com> (raw)
In-Reply-To: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com>
References: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com>

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



view thread (6+ messages)  latest in thread

Message-ID: <429E2AB3.7080405@opencloud.com>
Permalink:  ../429E2AB3.7080405@opencloud.com/
Also on:    postgresql.org/message-id/429E2AB3.7080405@opencloud.com

 · 

reply

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: <429E2AB3.7080405@opencloud.com>
  References: <51F5CF3C-F01E-4BB1-AA80-5AC3718FF2B4@fastcrypt.com> <429E2AB3.7080405@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