mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
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>
This commit is contained in:
@@ -438,7 +438,8 @@ ProcedureCreate(const char *procedureName,
|
||||
TupleDesc newdesc;
|
||||
|
||||
olddesc = build_function_result_tupdesc_t(oldtup);
|
||||
newdesc = build_function_result_tupdesc_d(allParameterTypes,
|
||||
newdesc = build_function_result_tupdesc_d(prokind,
|
||||
allParameterTypes,
|
||||
parameterModes,
|
||||
parameterNames);
|
||||
if (olddesc == NULL && newdesc == NULL)
|
||||
@@ -925,6 +926,7 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
|
||||
querytree_sublist);
|
||||
}
|
||||
|
||||
check_sql_fn_statements(querytree_list);
|
||||
(void) check_sql_fn_retval(funcoid, proc->prorettype,
|
||||
querytree_list,
|
||||
NULL, NULL);
|
||||
|
||||
Reference in New Issue
Block a user