From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
---|---|
To: | List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | callable statement with in/out params |
Date: | 2005-05-24 12:05:36 |
Message-ID: | 42931890.4020106@fastcrypt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2005-05-24 12:15:11 | cts modifications |
Previous Message | Thomas Kellerer | 2005-05-23 22:17:00 | Re: CREATE FUNCTION with JDBC |