PostgreSQL
Description
SPI_connect
opens a connection from a C function invocation to the SPI manager. You must call this function if you want to execute commands through SPI. Some utility SPI functions can be called from unconnected C functions.
SPI_connect_ext
does the same but has an argument that allows passing option flags. Currently, the following option values are available:
SPI_OPT_NONATOMIC
-
Sets the SPI connection to be nonatomic, which means that transaction control calls (
SPI_commit
,SPI_rollback
) are allowed. Otherwise, calling those functions will result in an immediate error.
SPI_connect()
is equivalent to SPI_connect_ext(0)
.
Submit correction
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.
Copyright © 1996-2023 The PostgreSQL Global Development Group