SPI_UNRE..._RELATION(3)

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

πŸ’… SPI_UNRE..._RELATION(3) πŸ’…

okay bestie, so this is a page from the PostgreSQL 14.24 Documentation and it's literally all about that one little function that cleans up after your ephemeral named relations. yes, that one. let's get into it 🫢


✨ NAME ✨

SPI_unregister_relation β€” remove an ephemeral named relation from the registry

like, it's the breakup function for your relation registry. no cap πŸ’”


✨ SYNOPSIS ✨

int SPI_unregister_relation(const char * name)

that's it. one function, one argument, so clean, so iconic πŸ’…


✨ DESCRIPTION ✨

so SPI_unregister_relation removes an ephemeral named relation from the registry for the current connection. that's the whole vibe. it's giving "declutter your registry, bestie" 🧹✨

important: it's per-connection, okay? the current connection's registry, nobody else's. iykyk 🌸


✨ ARGUMENTS ✨

  • const char * name β€” the relation registry entry name πŸ’– literally the name of the thing you're yeeting out of the registry

✨ RETURN VALUE ✨

πŸŽ€ if it worked

if the execution of the command was successful, then this nonnegative value gets returned:

  • SPI_OK_REL_UNREGISTER β€” if the tuplestore has been successfully removed from the registry πŸŽ‰ ate, no crumbs

πŸ’€ if it errored out

on error, one of these negative values comes back at you:

  • SPI_ERROR_ARGUMENT β€” if name is NULL πŸ™ˆ bestie you gotta actually pass a name
  • SPI_ERROR_UNCONNECTED β€” if called from an unconnected C function 😭 like the connection ghosted you
  • SPI_ERROR_REL_NOT_FOUND β€” if name is not found in the registry for the current connection πŸ” nothing to unregister, so sorry
fr fr, check those negative returns β€” a NULL name or an unconnected call will not magically slay, it'll just error at you πŸ™

and that's the whole page, bestie πŸ’œ

this icon was brought to you by PostgreSQL 14.24, dated 2026 β€” go forth and unregister responsibly, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from