diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-03-14 11:47:21 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-03-14 12:07:28 -0400 |
commit | 33803f67f1c4cb88733cce61207bbf2bd5b599cc (patch) | |
tree | 9ec962aebf50eb4b16a585f83f490d9a5aa6f677 /doc/src/sgml/plpython.sgml | |
parent | 484a4a08abe316212d67d84bb8705b06e44f862d (diff) |
Support INOUT arguments in procedures
In a top-level CALL, the values of INOUT arguments will be returned as a
result row. In PL/pgSQL, the values are assigned back to the input
arguments. In other languages, the same convention as for return a
record from a function is used. That does not require any code changes
in the PL implementations.
Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Diffstat (limited to 'doc/src/sgml/plpython.sgml')
-rw-r--r-- | doc/src/sgml/plpython.sgml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/src/sgml/plpython.sgml b/doc/src/sgml/plpython.sgml index ba79beb7437..3b7974690ed 100644 --- a/doc/src/sgml/plpython.sgml +++ b/doc/src/sgml/plpython.sgml @@ -651,6 +651,17 @@ $$ LANGUAGE plpythonu; SELECT * FROM multiout_simple(); </programlisting> </para> + + <para> + Output parameters of procedures are passed back the same way. For example: +<programlisting> +CREATE PROCEDURE python_triple(INOUT a integer, INOUT b integer) AS $$ +return (a * 3, b * 3) +$$ LANGUAGE plpythonu; + +CALL python_triple(5, 10); +</programlisting> + </para> </sect2> <sect2> |