SPI_UNRE..._RELATION(3)
π 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β ifnameisNULLπ bestie you gotta actually pass a nameSPI_ERROR_UNCONNECTEDβ if called from an unconnected C function π like the connection ghosted youSPI_ERROR_REL_NOT_FOUNDβ ifnameis 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
- opensuse-leap 16.0: postgresql14-docs 14.24-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