SPI_UNRE..._RELATION(3)

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

πŸ’– SPI_UNREGISTER_RELATION(3) πŸ’–

okay bestie, this one lives in the PostgreSQL 18.6 Documentation and it's genuinely so useful, i promise. it's SPI_unregister_relation and yes the title gets abbreviated as SPI_UNRE..._RELATION(3) because the man page gods ran out of room, not because it's mysterious. πŸŽ€


✨ NAME ✨

SPI_unregister_relation β€” remove an ephemeral named relation from the registry. that's it, that's the whole job, and she does it flawlessly. πŸ’…


🌸 SYNOPSIS 🌸

int SPI_unregister_relation(const char * name)

πŸ¦‹ DESCRIPTION πŸ¦‹

so SPI_unregister_relation removes an ephemeral named relation from the registry β€” and specifically the registry for the current connection. not somebody else's connection, not a global one, just yours. main character energy, local scope only. πŸ’œ


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * name β€” the relation registry entry name. that's the string you're yeeting out of the registry, bestie. 🫢

⭐ RETURN VALUE ⭐

if the command executed successfully, you get this (nonnegative) value back:

  • SPI_OK_REL_UNREGISTER β€” the tuplestore has been successfully removed from the registry. slay!! she's gone, iconic, no notes. ✨

on error, one of these negative values comes back instead (sad girl hours 😭):

  • SPI_ERROR_ARGUMENT β€” if name is NULL. like, girl, you have to give me a name. πŸ™ˆ
  • SPI_ERROR_UNCONNECTED β€” if it's called from an unconnected C function. no connection, no service. πŸ’€
  • SPI_ERROR_REL_NOT_FOUND β€” if name is not found in the registry for the current connection. she's not here, bestie, she never was. 🌸

lowkey important: check that return value. a negative one means something did NOT happen, and pretending otherwise is not the vibe. πŸ’…

and that's the whole page, bestie!! πŸ¦‹ this was brought to you by PostgreSQL 18.6, dated 2026 β€” go forth and unregister responsibly, ily, periodt. πŸ‘‘πŸ’–

πŸ“¦ where this page comes from