Move plpython's rejection of pseudotype arguments/results. Perform this work in the validator function, rather than repeating it during every function call. The previous coding not only performed unnecessary catalog lookups during function call setup, but failed to detect invalid argument types at CREATE FUNCTION time if check_function_bodies is off. That's not how that's supposed to work.
Review of this patch exposed that we were not testing some cases involving record-type output parameters, so add tests memorializing the expected behavior. In passing, fix an obsolete comment in plpython_composite.sql. Author: Tom Lane <[email protected]> Reviewed-by: shihao zhong <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/00d33e82bbb087d0f77fb5f49475885db62d1e37 Modified Files -------------- src/pl/plpython/expected/plpython_composite.out | 11 ++++- src/pl/plpython/expected/plpython_record.out | 28 +++++++++++++ src/pl/plpython/plpy_main.c | 56 +++++++++++++++++++++++-- src/pl/plpython/plpy_procedure.c | 48 +++------------------ src/pl/plpython/sql/plpython_composite.sql | 11 ++++- src/pl/plpython/sql/plpython_record.sql | 17 ++++++++ 6 files changed, 123 insertions(+), 48 deletions(-)
