SPI_REGISTER_RELATION(3pg16)
πΈ NAME πΈ
okay so this is the SPI_REGISTER_RELATION(3pg16) page from the PostgreSQL 16.15 docs β welcome to the bestie edition π
SPI_register_relation β makes an ephemeral named relation available by name in SPI queries. Periodt.
β¨ SYNOPSIS β¨
int SPI_register_relation(EphemeralNamedRelation enr)
π¦ DESCRIPTION π¦
okay so SPI_register_relation makes an ephemeral named relation β with all its associated information β available to queries that are planned and executed through the current SPI connection. Itβs giving βhey bestie, meet your queriesβ energy, but make it C API π
π ARGUMENTS π
EphemeralNamedRelation enrβ the ephemeral named relation registry entry. Thatβs the one, no cap π
π RETURN VALUE π
If the execution of the command was successful, then the following (nonnegative) value will be returned:
SPI_OK_REL_REGISTERβ if the relation has been successfully registered by name. slay β¨
On error, one of the following negative values is returned:
SPI_ERROR_ARGUMENTβ ifenrisNULLor itsnamefield isNULL.SPI_ERROR_UNCONNECTEDβ if called from an unconnected C function.SPI_ERROR_REL_DUPLICATEβ if the name specified in thenamefield ofenris already registered for this connection.
bestie, negative return values mean something went wrong β check which one you got π
xoxo, from PostgreSQL 16.15, dated 2026 β bye bestie, go register those ephemeral named relations responsibly π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16-docs 16.15-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