]> 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 17:33:46 +0000 (19:33 +0200)
This fixes an ABI break introduced by
293f5c5f496cd8ce87c65b393613da675fc0bb8d.

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 308e74fc0b3905ea2a36d1296bf456e236952ab0..5f9e0e311132685c26501371229c084e370e575c 100644 (file)
@@ -416,6 +416,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 7741dfbca88809d4ddf63bd18558847009a3a6b3..7bf361874d2069c848c4e8e5e5a66410c65f8f66 100644 (file)
@@ -164,6 +164,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);