IN/OUT parameters - Mailing list pgsql-hackers

From Dave Cramer
Subject IN/OUT parameters
Date
Msg-id 42936EF8.7000703@fastcrypt.com
Whole thread Raw
Responses Re: IN/OUT parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: IN/OUT parameters  (Josh Berkus <josh@agliodbs.com>)
Re: IN/OUT parameters  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I've been working on adding the functionality into the jdbc driver and 
I'm having some issues.

Currently the bind message does not know anything about directionality 
of the parameter. This means that considerable gyrations need to be done 
by the driver to transform

create function foo( out p1 int, in p2 int,  out p3  int) ....
then a subsequent
"{call = select foo(?,?,?)}

This would need to be currently transformed into select foo(?), with the 
other two being discarded.

It seems to me that the bind message needs to support the notion of 
direction in order for this to work cleanly.

Alternatively we could punt and use SQL Server's mechanism where they 
only support IN, and INOUT, which would require all parameters to be 
sent to the procedure.

On a related note, drop function needs to support the in/out direction.

Dave

-- 
Dave Cramer
http://www.postgresintl.com
519 939 0336
ICQ#14675561



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: 8.0.x RPM issues
Next
From: Devrim GUNDUZ
Date:
Subject: Re: 8.0.x RPM issues