pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Move plpython's rejection of pseudotype arguments/results.
Date: Sun, 01 Nov 2026 22:28:32 +0000
Message-ID: <E1xNe2S-00000001iGc-0voK@gemulon.postgresql.org> (raw)

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 <tgl@sss.pgh.pa.us>
Reviewed-by: shihao zhong <zhong950419@gmail.com>
Discussion: https://postgr.es/m/2865288.1793403201@sss.pgh.pa.us

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(-)



Message-ID: <E1xNe2S-00000001iGc-0voK@gemulon.postgresql.org>
Permalink:  ../E1xNe2S-00000001iGc-0voK@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xNe2S-00000001iGc-0voK@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Move plpython's rejection of pseudotype arguments/results.
  In-Reply-To: <E1xNe2S-00000001iGc-0voK@gemulon.postgresql.org>
  References: <E1xNe2S-00000001iGc-0voK@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox