1SPI_FREETUPTABLE(3)      PostgreSQL 15.4 Documentation     SPI_FREETUPTABLE(3)
2
3
4

NAME

6       SPI_freetuptable - free a row set created by SPI_execute or a similar
7       function
8

SYNOPSIS

10       void SPI_freetuptable(SPITupleTable * tuptable)
11

DESCRIPTION

13       SPI_freetuptable frees a row set created by a prior SPI command
14       execution function, such as SPI_execute. Therefore, this function is
15       often called with the global variable SPI_tuptable as argument.
16
17       This function is useful if an SPI-using C function needs to execute
18       multiple commands and does not want to keep the results of earlier
19       commands around until it ends. Note that any unfreed row sets will be
20       freed anyway at SPI_finish. Also, if a subtransaction is started and
21       then aborted within execution of an SPI-using C function, SPI
22       automatically frees any row sets created while the subtransaction was
23       running.
24
25       Beginning in PostgreSQL 9.3, SPI_freetuptable contains guard logic to
26       protect against duplicate deletion requests for the same row set. In
27       previous releases, duplicate deletions would lead to crashes.
28

ARGUMENTS

30       SPITupleTable * tuptable
31           pointer to row set to free, or NULL to do nothing
32
33
34
35PostgreSQL 15.4                      2023                  SPI_FREETUPTABLE(3)
Impressum