SPI_CONNECT(3)

πŸ“¦ version 17.11, in opensuse-leap 16.0

🌸 SPI_CONNECT(3) β€” connect a C function to the SPI manager πŸ’…

manual page: SPI_CONNECT(3) β€” yes bestie, the manual name is folded in right here ✨

πŸ’– NAME πŸ’–

SPI_connect, SPI_connect_ext β€” connect a C function to the SPI manager, periodt.

✨ SYNOPSIS ✨

int SPI_connect(void)

int SPI_connect_ext(int options)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so 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 β€” iykyk. No cap, that’s the whole vibe.

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. fr fr, that immediate error is not a vibe.

SPI_connect() is equivalent to SPI_connect_ext(0). literally the same energy 🫢

🌈 RETURN VALUE 🌈

  • SPI_OK_CONNECT β€” on success πŸŽ‰
  • SPI_ERROR_CONNECT β€” on error 😭
vibe check passed = success, vibe check failed = error, iykyk

xoxo, from the PostgreSQL 17.11 documentation, dated 2026 β€” page SPI_CONNECT(3) πŸ’–

πŸ“¦ where this page comes from