1SPI_FINISH(3) PostgreSQL 9.2.24 Documentation SPI_FINISH(3)
2
3
4
6 SPI_finish - disconnect a procedure 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 procedure'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
18 If SPI_finish is called without having a valid connection, it will
19 return SPI_ERROR_UNCONNECTED. There is no fundamental problem with
20 this; it means that the SPI manager has nothing to do.
21
23 SPI_OK_FINISH
24 if properly disconnected
25
26 SPI_ERROR_UNCONNECTED
27 if called from an unconnected procedure
28
29
30
31PostgreSQL 9.2.24 2017-11-06 SPI_FINISH(3)