]> 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:38:24 +0000 (19:38 +0200)
This fixes an ABI break introduced by
2f6b8c287b881fd33168d8c15c56f71163ff3ba6.

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 0f5932c93bc191537b6d07db264c93591358d427..5484278a7e0e02baf5b6bee2ec8bab52fc775cb9 100644 (file)
@@ -381,6 +381,16 @@ SPI_rollback(void)
        PG_END_TRY();
 }
 
+/*
+ * 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 41cca05b274704fa6c08a8323f7200cbedafd0a1..b16440cf004bdbc8e166de0c1bdf03e21b3d2bfa 100644 (file)
@@ -163,6 +163,7 @@ extern void SPI_start_transaction(void);
 extern void SPI_commit(void);
 extern void SPI_rollback(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);