output parameters in functions?

Поиск
Список
Период
Сортировка
Искать

output parameters in functions?

От:
Aled Morris <aled@tesco.net>
Дата:
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?

От:
Josh Berkus <josh@agliodbs.com>
Дата:
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
FAQ