Unix Technical Forum

callable statement with in/out params

This is a discussion on callable statement with in/out params within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> I've been looking at modifying the driver to handle IN/OUT params (among other things) Here is the problem: Internally ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:17 PM
Dave Cramer
 
Posts: n/a
Default callable statement with in/out params

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


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com