Re: Proposal: OUT parameters for plpgsql - Mailing list pgsql-hackers

From Gavin Sherry
Subject Re: Proposal: OUT parameters for plpgsql
Date
Msg-id Pine.LNX.4.58.0503220928390.929@linuxworld.com.au
Whole thread Raw
In response to Re: Proposal: OUT parameters for plpgsql  (Greg Stark <gsstark@mit.edu>)
Responses Re: Proposal: OUT parameters for plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, 21 Mar 2005, Greg Stark wrote:

> Tom Lane <tgl@sss.pgh.pa.us> writes:
>
> > The generic thing: you can write OUT and INOUT parameters in CREATE
> > FUNCTION.  If you do, you can omit the RETURNS clause, in which case the
> > result type of the function is implicitly RECORD; or you can specify
> > RECORD explicitly; or you can specify SETOF RECORD; or, if there's just
> > one OUT/INOUT param, you can specify that param's type or SETOF it.
> > (When there is just one, should the default be to return that type
> > rather than a one-column RECORD?)
>
> Do other databases not allow you to specify a return value in addition to the
> OUT and INOUT parameters?

ANSI SQL allows at most one OUT parameter for a function (which can be
used instead of having the function return a value via the usual means).

AFAICT DB2 and Oracle reserve parameter functionality for procedures.

Gavin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal: OUT parameters for plpgsql
Next
From: Tom Lane
Date:
Subject: Re: Proposal: OUT parameters for plpgsql