SPI_REGISTER_RELATION(3pg13)
πΈ NAME πΈ
okay so bestie, this is the SPI_REGISTER_RELATION(3) page from the PostgreSQL 13 docs, and it's here to explain how SPI_register_relation literally makes an ephemeral named relation available by name in SPI queries. no cap, that's the whole vibe. π
β¨ SYNOPSIS β¨
the signature is giving:
int SPI_register_relation(EphemeralNamedRelation enr)
π¦ DESCRIPTION π¦
SPI_register_relation makes an ephemeral named relation β with associated information β available to queries planned and executed through the current SPI connection. it's giving matchmaker for your SPI queries, and honestly? iconic. π
π ARGUMENTS π
EphemeralNamedRelation enrβ the ephemeral named relation registry entry. that's the whole argument, bestie. π«Ά
π₯ RETURN VALUE π₯
if the execution of the command was successful, you get this nonnegative value back:
SPI_OK_REL_REGISTERβ if the relation has been successfully registered by name. slay. β¨
on error, one of these 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. π
that's the whole page, bestie π«Ά β sourced from PostgreSQL 13.23 docs, dated 2025, and it's SPI_REGISTER_RELATION(3), periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql13-docs 13.23-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