Re: question about about future 8.1 and IN, INOUT, and OUT parameters
От | Michael Fuhr |
---|---|
Тема | Re: question about about future 8.1 and IN, INOUT, and OUT parameters |
Дата | |
Msg-id | 20050426010352.GA9840@winnie.fuhr.org обсуждение исходный текст |
Ответ на | question about about future 8.1 and IN, INOUT, and OUT parameters (Tony Caduto <tony_caduto@amsoftwaredesign.com>) |
Ответы |
Re: question about about future 8.1 and IN, INOUT, and OUT parameters
|
Список | pgsql-general |
On Sun, Apr 24, 2005 at 11:05:57PM -0500, Tony Caduto wrote: > > I saw that the recently released pl/java has the ablity to use IN, INOUT, and > OUT parameters. > > Is the syntax going to be exactly like it is in Oracle? I'm not familiar with the Oracle syntax and I don't know how close the PostgreSQL implementation is to being final, but here's an example that works with the most recent code from HEAD (8.1devel): CREATE FUNCTION foo(IN x integer, INOUT y integer, OUT z integer) AS $$ BEGIN y := y + 5; z := x + 5; END; $$ LANGUAGE plpgsql IMMUTABLE STRICT; SELECT foo(10, 20); foo --------- (25,15) (1 row) SELECT (foo(10, 20)).*; y | z ----+---- 25 | 15 (1 row) SELECT (foo).* FROM (SELECT foo(10, 20)) AS s; y | z ----+---- 25 | 15 (1 row) -- Michael Fuhr http://www.fuhr.org/~mfuhr/
В списке pgsql-general по дате отправления: