SPI_REGISTER_RELATION(3pg15)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to the SPI_REGISTER_RELATION(3) page β€” and the whole serve is this: SPI_register_relation makes an ephemeral named relation available by name in SPI queries. that's the name tea β˜•βœ¨

🌸 SYNOPSIS 🌸

int SPI_register_relation(EphemeralNamedRelation enr)

πŸ¦‹ DESCRIPTION πŸ¦‹

SPI_register_relation makes an ephemeral named relation β€” with all its associated information β€” available to queries planned and executed through the current SPI connection. it's giving β€œput this name on the guest list so your SPI queries can use it” πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • EphemeralNamedRelation enr β€” the ephemeral named relation registry entry. that's the registry entry you're handing over, 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 comes back instead:

  • SPI_ERROR_ARGUMENT β€” if enr is NULL or its name field is NULL
  • SPI_ERROR_UNCONNECTED β€” if called from an unconnected C function
  • SPI_ERROR_REL_DUPLICATE β€” if the name specified in the name field of enr is already registered for this connection

and that's the page, bestie 🫢 this was the PostgreSQL 15.19 documentation, dated 2026, for SPI_REGISTER_RELATION(3) β€” mwah πŸ’‹

πŸ“¦ where this page comes from