Support INOUT arguments in procedures

Peter Eisentraut <peter_e@gmx.net>

Commit: 33803f67f1c4cb88733cce61207bbf2bd5b599cc
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2018-03-14T16:07:28Z
Releases: 11.0
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>

Files

PathChange+/−
doc/src/sgml/plperl.sgml modified +14 −0
doc/src/sgml/plpgsql.sgml modified +16 −0
doc/src/sgml/plpython.sgml modified +11 −0
doc/src/sgml/pltcl.sgml modified +12 −0
doc/src/sgml/ref/call.sgml modified +4 −0
doc/src/sgml/ref/create_procedure.sgml modified +5 −2
src/backend/catalog/pg_proc.c modified +3 −1
src/backend/commands/functioncmds.c modified +55 −10
src/backend/executor/functions.c modified +51 −0
src/backend/tcop/utility.c modified +2 −1
src/backend/utils/fmgr/funcapi.c modified +7 −4
src/include/commands/defrem.h modified +2 −1
src/include/executor/functions.h modified +2 −0
src/include/funcapi.h modified +2 −1
src/pl/plperl/expected/plperl_call.out modified +25 −0
src/pl/plperl/sql/plperl_call.sql modified +22 −0
src/pl/plpgsql/src/expected/plpgsql_call.out modified +112 −0
src/pl/plpgsql/src/expected/plpgsql_transaction.out modified +1 −1
src/pl/plpgsql/src/pl_comp.c modified +6 −4
src/pl/plpgsql/src/pl_exec.c modified +124 −1
src/pl/plpgsql/src/pl_funcs.c modified +25 −0
src/pl/plpgsql/src/pl_gram.y modified +27 −10
src/pl/plpgsql/src/plpgsql.h modified +12 −0
src/pl/plpgsql/src/pl_scanner.c modified +1 −0
src/pl/plpgsql/src/sql/plpgsql_call.sql modified +107 −0
src/pl/plpython/expected/plpython_call.out modified +23 −0
src/pl/plpython/plpy_exec.c modified +11 −13
src/pl/plpython/sql/plpython_call.sql modified +20 −0
src/pl/tcl/expected/pltcl_call.out modified +26 −0
src/pl/tcl/sql/pltcl_call.sql modified +23 −0
src/test/regress/expected/create_procedure.out modified +22 −1
src/test/regress/sql/create_procedure.sql modified +19 −0

Documentation touched