From: Dave Cramer <pg@fastcrypt.com>
To: List <pgsql-jdbc@postgresql.org>
Subject: callable statement with in/out params
Date: Tue, 24 May 2005 08:05:36 -0400
Message-ID: <42931890.4020106@fastcrypt.com> (raw)
I've been looking at modifying the driver to handle IN/OUT params (among
other things)
Here is the problem:
Internally the driver parses the statement and builds arrays of
prospective parameters which are by default IN parameters. Now the way
callable statement works is that parameters are registered AFTER the
statment is created, and some of the IN parameters become OUT
parameters, which are not sent to the backend
So if you define a function
create function foo( out arg1 int, out arg2 int, out arg3 int )
and the statement is "{call foo(?,?,?) }"
we want to send "select * from foo() as result" to the backend.
So far I've modified SimpleParameterList to have separate in/out lists.
However I've run into a wall with the way the query is built after that.
As it has been broken up into parts and then is later rebuilt using the
parameters. However it assumes that all of the parts of the query will
be sent, and in this case they won't.
Another set of eyes on this would help greatly.
--
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561
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: pg@fastcrypt.com
Subject: Re: callable statement with in/out params
In-Reply-To: <42931890.4020106@fastcrypt.com>
References: <42931890.4020106@fastcrypt.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