1SPI_FINISH(3) PostgreSQL 15.4 Documentation SPI_FINISH(3)
2
3
4
6 SPI_finish - disconnect a C function from the SPI manager
7
9 int SPI_finish(void)
10
12 SPI_finish closes an existing connection to the SPI manager. You must
13 call this function after completing the SPI operations needed during
14 your C function's current invocation. You do not need to worry about
15 making this happen, however, if you abort the transaction via
16 elog(ERROR). In that case SPI will clean itself up automatically.
17
19 SPI_OK_FINISH
20 if properly disconnected
21
22 SPI_ERROR_UNCONNECTED
23 if called from an unconnected C function
24
25
26
27PostgreSQL 15.4 2023 SPI_FINISH(3)