SPI_UNRE..._RELATION(3)
β¨ SPI_unregister_relation(3) β¨
okay so bestie, welcome to the SPI_unregister_relation page β it's living inside the PostgreSQL 16.15 Documentation and honestly it's giving "small but mighty" π it's a section-3 libpq/SPI-adjacent manual page and we're gonna get through it together, no cap.
πΈ NAME πΈ
SPI_unregister_relation β remove an ephemeral named relation from the registry π
like, it's the breakup function. the relation is leaving the group chat. periodt.
π¦ SYNOPSIS π¦
int SPI_unregister_relation(const char * name)
look at her. one argument. returns an int. iconic behavior honestly β¨
π DESCRIPTION π
SPI_unregister_relation removes an ephemeral named relation from the registry for the current connection.
that's it. that's the whole vibe. it's the un-registering counterpart to whatever got that relation in there in the first place, and it only touches the current connection's registry β so don't go thinking it's cleaning up everybody's stuff, because she is not π«Ά
π ARGUMENTS π
const char * nameβ the relation registry entry name π₯ literally just the name of the entry you want gone. that's the whole argument. slay.
β RETURN VALUE β
bestie, listen, the return value has two whole moods depending on how things went π
π On success
If the execution of the command was successful then the following (nonnegative) value will be returned:
SPI_OK_REL_UNREGISTERβ if the tuplestore has been successfully removed from the registry π (yes, nonnegative β she's happy, she's thriving, she ate)
π On error
On error, one of the following negative values is returned:
SPI_ERROR_ARGUMENTβ ifnameisNULLπ like babe you have to actually give her a nameSPI_ERROR_UNCONNECTEDβ if called from an unconnected C function π no connection, no serviceSPI_ERROR_REL_NOT_FOUNDβ ifnameis not found in the registry for the current connection π she looked everywhere and that entry is simply not there
ngl the negative-return thing is the actual important part β check it, don't just assume it worked, because a NULL name or a not-found entry is lowkey easy to hit and it will not warn you any louder than this π
k byeee, that's the whole page π§ go unregister something responsibly π
sign-off szn: this was PostgreSQL 16.15, dated 2026, and the page is SPI_UNRE..._RELATION(3) β mwah, stan the docs, see u in SEE ALSO (jk there isn't one, this page said "that's all folks") ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16-docs 16.15-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