Thread: output parameters in functions?

output parameters in functions?

From
Aled Morris
Date:
I read the docs for CREATE FUNCTION, and searched for "output parameter", but
couldn't find any answer.

There was a post asking for help in converting a SQL Server stored procedure
that used an output parameter, but the solution seemed to be to use the
RETURN statement for the output parameter.

So, is it possible to define output parameters in functions?

Cheers,

AM

Re: output parameters in functions?

From
Josh Berkus
Date:
Aled,

> So, is it possible to define output parameters in functions?

No.   Nobody's opposed to this ... it would most likely be part of a CREATE
PROCEDURE implementation ... but nothing is built or even in process.

I'd suggest using 7.3's SET RETURNING FUNCTIONS to return multiple values.
Check out  http://techdocs.postgresql.org/guides/SetReturningFunctions

--
Josh Berkus
Aglio Database Solutions
San Francisco