postgresql/src/pl/plpython
Tom Lane 218527d014 Don't bother checking the result of SPI_connect[_ext] anymore.
SPI_connect/SPI_connect_ext have not returned any value other than
SPI_OK_CONNECT since commit 1833f1a1c in v10; any errors are thrown
via ereport.  (The most likely failure is out-of-memory, which has
always been thrown that way, so callers had better be prepared for
such errors.)  This makes it somewhat pointless to check these
functions' result, and some callers within our code haven't been
bothering; indeed, the only usage example within spi.sgml doesn't
bother.  So it's likely that the omission has propagated into
extensions too.

Hence, let's standardize on not checking, and document the return
value as historical, while not actually changing these functions'
behavior.  (The original proposal was to change their return type
to "void", but that would needlessly break extensions that are
conforming to the old practice.)  This saves a small amount of
boilerplate code in a lot of places.

Stepan Neretin

Discussion: https://postgr.es/m/CAMaYL5Z9Uk8cD9qGz9QaZ2UBJFOu7jFx5Mwbznz-1tBbPDQZow@mail.gmail.com
2024-09-09 12:18:34 -04:00
..
expected Fix recursive RECORD-returning plpython functions. 2024-05-09 13:16:34 -04:00
po Translation updates 2024-05-06 12:06:31 +02:00
sql Fix recursive RECORD-returning plpython functions. 2024-05-09 13:16:34 -04:00
.gitignore plpython: Remove regression test infrastructure for Python 2. 2022-03-07 18:20:51 -08:00
generate-spiexceptions.pl Update copyright for 2024 2024-01-03 20:49:05 -05:00
Makefile Hide warnings from Python headers when using gcc-compatible compiler. 2023-12-26 16:16:37 -05:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
nls.mk Make formatting in nls.mk files more consistent 2024-05-14 09:21:17 +02:00
plpy_cursorobject.c Mark misc static global variables as const 2024-08-06 23:04:48 +03:00
plpy_cursorobject.h Make PL/Python handle domain-type conversions correctly. 2017-11-16 16:23:04 -05:00
plpy_elog.c Fix assertion failure with PL/Python exceptions 2023-09-19 08:31:06 +09:00
plpy_elog.h Mark all symbols exported from extension libraries PGDLLEXPORT. 2022-07-17 18:50:14 -07:00
plpy_exec.c Fix recursive RECORD-returning plpython functions. 2024-05-09 13:16:34 -04:00
plpy_exec.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
plpy_main.c Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04: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 Don't corrupt plpython's "TD" dictionary in a recursive trigger call. 2024-05-07 18:15:00 -04:00
plpy_procedure.h Don't corrupt plpython's "TD" dictionary in a recursive trigger call. 2024-05-07 18:15:00 -04: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 Update copyright for 2024 2024-01-03 20:49:05 -05: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
plpython_system.h Update copyright for 2024 2024-01-03 20:49:05 -05:00