postgresql/src/pl/plpython/sql
Tom Lane d727c54317 Fix recursive RECORD-returning plpython functions.
If we recursed to a new call of the same function, with a different
coldeflist (AS clause), it would fail because the inner call would
overwrite the outer call's idea of what to return.  This is vaguely
like 1d2fe56e4 and c5bec5426, but it's not due to any API decisions:
it's just that we computed the actual output rowtype at the start of
the call, and saved it in the per-procedure data structure.  We can
fix it at basically zero cost by doing the computation at the end
of each call instead of the start.

It's not clear that there's any real-world use-case for such a
function, but given that it doesn't cost anything to fix,
it'd be silly not to.

Per report from Andreas Karlsson.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/1651a46d-3c15-4028-a8c1-d74937b54e19@proxel.se
2024-05-09 13:16:34 -04:00
..
plpython_call.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_composite.sql Fix recursive RECORD-returning plpython functions. 2024-05-09 13:16:34 -04:00
plpython_do.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_drop.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_ereport.sql Fix a couple of typos 2023-03-22 08:44:59 +09:00
plpython_error.sql Fix assertion failure with PL/Python exceptions 2023-09-19 08:31:06 +09:00
plpython_global.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_import.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_newline.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_params.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_populate.sql Remove extra newlines at end and beginning of files, add missing newlines 2010-08-19 05:57:36 +00:00
plpython_quote.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_record.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_schema.sql Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
plpython_setof.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_spi.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_subtransaction.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_test.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_transaction.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_trigger.sql Don't corrupt plpython's "TD" dictionary in a recursive trigger call. 2024-05-07 18:15:00 -04:00
plpython_types.sql Tighten array dimensionality checks in Python -> SQL array conversion. 2023-05-04 11:00:33 -04:00
plpython_unicode.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
plpython_void.sql plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00