1SPI_FREETUPTABLE(3) PostgreSQL 10.7 Documentation SPI_FREETUPTABLE(3)
2
3
4
6 SPI_freetuptable - free a row set created by SPI_execute or a similar
7 function
8
10 void SPI_freetuptable(SPITupleTable * tuptable)
11
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 a SPI procedure needs to execute multiple
18 commands and does not want to keep the results of earlier commands
19 around until it ends. Note that any unfreed row sets will be freed
20 anyway at SPI_finish. Also, if a subtransaction is started and then
21 aborted within execution of a SPI procedure, SPI automatically frees
22 any row sets created while the subtransaction was running.
23
24 Beginning in PostgreSQL 9.3, SPI_freetuptable contains guard logic to
25 protect against duplicate deletion requests for the same row set. In
26 previous releases, duplicate deletions would lead to crashes.
27
29 SPITupleTable * tuptable
30 pointer to row set to free, or NULL to do nothing
31
32
33
34PostgreSQL 10.7 2019 SPI_FREETUPTABLE(3)