IN/OUT parameters

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: IN/OUT parameters
Date: 2005-05-24 18:14:16
Message-ID: 42936EF8.7000703@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim GUNDUZ 2005-05-24 18:19:20 Re: 8.0.x RPM issues
Previous Message Dave Cramer 2005-05-24 16:29:47 Re: 8.0.x RPM issues

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2005-05-24 18:29:20 Re: IN/OUT parameters
Previous Message Dave Cramer 2005-05-24 12:15:11 cts modifications