postgresql/src/pl/plpython
Nathan Bossart 57d0051706 Move return statements out of PG_TRY blocks.
If we exit a PG_TRY block early via "continue", "break", "goto", or
"return", we'll skip unwinding its exception stack.  This change
moves a couple of such "return" statements in PL/Python out of
PG_TRY blocks.  This was introduced in d0aa965c0a and affects all
supported versions.

We might also be able to add compile-time checks to prevent
recurrence, but that is left as a future exercise.

Reported-by: Mikhail Gribkov, Xing Guo
Author: Xing Guo
Reviewed-by: Michael Paquier, Andres Freund, Tom Lane
Discussion: https://postgr.es/m/CAMEv5_v5Y%2B-D%3DCO1%2Bqoe16sAmgC4sbbQjz%2BUtcHmB6zcgS%2B5Ew%40mail.gmail.com
Discussion: https://postgr.es/m/CACpMh%2BCMsGMRKFzFMm3bYTzQmMU5nfEEoEDU2apJcc4hid36AQ%40mail.gmail.com
Backpatch-through: 11 (all supported versions)
2023-05-04 16:23:05 -07:00
..
expected Tighten array dimensionality checks in Python -> SQL array conversion. 2023-05-04 11:00:33 -04:00
po meson: add install-{quiet, world} targets 2023-03-23 21:20:18 -07:00
sql Tighten array dimensionality checks in Python -> SQL array conversion. 2023-05-04 11:00:33 -04:00
.gitignore plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
Makefile plpython: Don't create pgxsdir subdirectory in installdir target 2022-08-31 07:42:01 +02:00
generate-spiexceptions.pl Update copyright for 2023 2023-01-02 15:00:37 -05:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
nls.mk Break up long GETTEXT_FILES lists 2023-03-08 15:05:43 +01:00
plpy_cursorobject.c Fix final warnings produced by -Wshadow=compatible-local 2022-10-07 13:13:27 +13:00
plpy_cursorobject.h Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpy_elog.c plpython: Code cleanup related to removal of Python 2 support. 2022-03-07 18:30:28 -08:00
plpy_elog.h Mark all symbols exported from extension libraries PGDLLEXPORT. 2022-07-17 18:50:14 -07:00
plpy_exec.c Move return statements out of PG_TRY blocks. 2023-05-04 16:23:05 -07:00
plpy_exec.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_main.c Fix various typos and incorrect/outdated name references 2023-04-19 13:50:33 +12:00
plpy_main.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_planobject.c plpython: Code cleanup related to removal of Python 2 support. 2022-03-07 18:30:28 -08:00
plpy_planobject.h Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpy_plpymodule.c plpython: Code cleanup related to removal of Python 2 support. 2022-03-07 18:30:28 -08:00
plpy_plpymodule.h plpython: add missing plpython.h include to plpy_plpymodule.h 2022-03-08 09:47:34 -08:00
plpy_procedure.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
plpy_procedure.h SQL procedures 2017-11-30 11:03:20 -05:00
plpy_resultobject.c Harmonize some more function parameter names. 2023-04-13 10:15:20 -07:00
plpy_resultobject.h Fix assorted header files that failed to compile standalone. 2019-05-31 11:45:33 -04:00
plpy_spi.c Convert the reg* input functions to report (most) errors softly. 2022-12-27 12:26:01 -05:00
plpy_spi.h Fix SPI's handling of errors during transaction commit. 2022-02-28 12:45:36 -05:00
plpy_subxactobject.c Clear some style deviations. 2020-05-21 08:31:16 -07:00
plpy_subxactobject.h Make the order of the header file includes consistent. 2019-11-25 08:08:57 +05:30
plpy_typeio.c Tighten array dimensionality checks in Python -> SQL array conversion. 2023-05-04 11:00:33 -04:00
plpy_typeio.h Mark all symbols exported from extension libraries PGDLLEXPORT. 2022-07-17 18:50:14 -07:00
plpy_util.c plpython: Code cleanup related to removal of Python 2 support. 2022-03-07 18:30:28 -08:00
plpy_util.h Mark all symbols exported from extension libraries PGDLLEXPORT. 2022-07-17 18:50:14 -07:00
plpython.h plpython: Stop undefining _POSIX_C_SOURCE, _XOPEN_SOURCE 2023-01-25 09:59:26 -08:00
plpython3u--1.0.sql Invent "trusted" extensions, and remove the pg_pltemplate catalog. 2020-01-29 18:42:43 -05:00
plpython3u.control Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00