SPI_UNRE..._RELATION(3)
π 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β ifnameisNULL. 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β ifnameis 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
- alpine 3.23: postgresql18-doc 18.6-r0 Β· PostgreSQL
- alpine 3.24: postgresql18-doc 18.6-r0 Β· PostgreSQL
- arch rolling: postgresql 18.6-4 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 43: postgresql-server-devel 18.6-1.fc43 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- fedora 44: postgresql-server-devel 18.6-1.fc44 Β· PostgreSQL
- nixos 26.05: postgresql 18.6
- ubuntu resolute: postgresql-doc-18 18.6-0ubuntu0.26.04.1 Β· PostgreSQL
- ubuntu stonking: postgresql-doc-18 18.6-3build2 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms