postgres/contrib/spi
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
..
Makefile Remove support for upgrading extensions from "unpackaged" state. 2020-02-19 16:59:14 -05:00
autoinc--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
autoinc.c Use wrappers of PG_DETOAST_DATUM_PACKED() more. 2017-03-12 19:35:34 -04:00
autoinc.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
autoinc.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
insert_username--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
insert_username.c Replace uses of SPI_modifytuple that intend to allocate in current context. 2016-11-08 15:36:44 -05:00
insert_username.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
insert_username.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
meson.build Update copyright for 2024 2024-01-03 20:49:05 -05:00
moddatetime--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
moddatetime.c Make the order of the header file includes consistent in contrib modules. 2019-10-24 08:05:34 +05:30
moddatetime.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
moddatetime.example Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
refint--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
refint.c Don't bother checking the result of SPI_connect[_ext] anymore. 2024-09-09 12:18:34 -04:00
refint.control Convert contrib modules to use the extension facility. 2011-02-13 22:54:49 -05:00
refint.example Fix inconsistencies and typos in the tree, take 10 2019-08-13 13:53:41 +09:00