diff options
author | Nathan Bossart <nathan@postgresql.org> | 2023-11-15 13:42:30 -0600 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2023-11-15 13:42:30 -0600 |
commit | 6a72c42fd5af7ada49584694f543eb06dddb4a87 (patch) | |
tree | c2f566a161756b8aca8a58d58d4b0a0b6ee08da7 /src/backend/executor/spi.c | |
parent | 83267b15bf0dffa6e1096608bda95b8488048bb9 (diff) | |
download | postgresql-6a72c42fd5af7ada49584694f543eb06dddb4a87.tar.gz postgresql-6a72c42fd5af7ada49584694f543eb06dddb4a87.zip |
Retire MemoryContextResetAndDeleteChildren() macro.
As of commit eaa5808e8e, MemoryContextResetAndDeleteChildren() is
just a backwards compatibility macro for MemoryContextReset(). Now
that some time has passed, this macro seems more likely to create
confusion.
This commit removes the macro and replaces all remaining uses with
calls to MemoryContextReset(). Any third-party code that use this
macro will need to be adjusted to call MemoryContextReset()
instead. Since the two have behaved the same way since v9.5, such
adjustments won't produce any behavior changes for all
currently-supported versions of PostgreSQL.
Reviewed-by: Amul Sul, Tom Lane, Alvaro Herrera, Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/20231113185950.GA1668018%40nathanxps13
Diffstat (limited to 'src/backend/executor/spi.c')
-rw-r--r-- | src/backend/executor/spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 33975687b38..0e46c59d25d 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -547,7 +547,7 @@ AtEOSubXact_SPI(bool isCommit, SubTransactionId mySubid) if (_SPI_current->execSubid >= mySubid) { _SPI_current->execSubid = InvalidSubTransactionId; - MemoryContextResetAndDeleteChildren(_SPI_current->execCxt); + MemoryContextReset(_SPI_current->execCxt); } /* throw away any tuple tables created within current subxact */ @@ -3083,7 +3083,7 @@ _SPI_end_call(bool use_exec) /* mark Executor context no longer in use */ _SPI_current->execSubid = InvalidSubTransactionId; /* and free Executor memory */ - MemoryContextResetAndDeleteChildren(_SPI_current->execCxt); + MemoryContextReset(_SPI_current->execCxt); } return 0; |