]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Re-add SPICleanup for ABI compatibility in stable branch
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 18 Jul 2022 14:23:48 +0000 (16:23 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 18 Jul 2022 14:23:48 +0000 (16:23 +0200)
This fixes an ABI break introduced by
604651880c71c5106a72529b9ce29eaad0cfab27.

Author: Markus Wanner <markus.wanner@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/defd749a-8410-841d-1126-21398686d63d@enterprisedb.com

src/backend/executor/spi.c
src/include/executor/spi.h

index dd5ef76270716e1c9311ccf6eca69af62f336ddc..f73c1e79e182c05926c31d60a830d0aee3a4ae2e 100644 (file)
@@ -422,6 +422,16 @@ SPI_rollback_and_chain(void)
        _SPI_rollback(true);
 }
 
+/*
+ * SPICleanup is a no-op, kept for backwards compatibility. We rely on
+ * AtEOXact_SPI to cleanup. Extensions should not (need to) fiddle with the
+ * internal SPI state directly.
+ */
+void
+SPICleanup(void)
+{
+}
+
 /*
  * Clean up SPI state at transaction commit or abort.
  */
index 153eb5c7ad57de3a11960ef3c5f9e3e145eb7bbe..1e66a7d2ea04bd70445918645659002fae1f0e70 100644 (file)
@@ -205,6 +205,7 @@ extern void SPI_commit_and_chain(void);
 extern void SPI_rollback(void);
 extern void SPI_rollback_and_chain(void);
 
+extern void SPICleanup(void);
 extern void AtEOXact_SPI(bool isCommit);
 extern void AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid);
 extern bool SPI_inside_nonatomic_context(void);