SPI_CONNECT(3)
πΈ NAME πΈ
Okay so this is the SPI_CONNECT(3) page, bestie β and it's literally about SPI_connect and SPI_connect_ext: they connect a C function to the SPI manager. Periodt.
β¨ SYNOPSIS β¨
int SPI_connect(void)
int SPI_connect_ext(int options)
π 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, so it's giving "not every SPI thing needs the full connection." π
SPI_connect_ext does the same thing, but it has an argument that lets you pass option flags. Currently, these option values are available:
SPI_OPT_NONATOMICβ sets the SPI connection to be nonatomic, which means transaction control calls (SPI_commit,SPI_rollback) are allowed. Otherwise, calling those functions will result in an immediate error. So yeah, if you want commit/rollback energy, this flag is your main character. π
Also, SPI_connect() is equivalent to SPI_connect_ext(0). Cute shorthand, no cap.
π RETURN VALUE π
SPI_OK_CONNECTβ on success β¨SPI_ERROR_CONNECTβ on error π
This manual page is from the PostgreSQL 15.19 docs, dated 2026 β mwah, go connect those C functions and slay, bestie π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15-docs 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms