SPI_GETRELNAME(3)
β¨ SPI_GETRELNAME β¨
okay bestie, welcome to section 3 of the PostgreSQL 18.6 docs π this one's a lil function called SPI_getrelname, and it's giving "tell me her name" energy. no cap.
πΈ NAME πΈ
SPI_getrelname β bestie, this hands you back the name of the specified relation π
π¦ SYNOPSIS π¦
char * SPI_getrelname(Relation rel)
π DESCRIPTION π
so here's the tea: SPI_getrelname returns a copy of the name of the relation you pass in. like, an actual copy, not just a pointer to the original, which is so thoughtful of it honestly π«Ά
and because it's a copy, you own it β so when you're done with it and don't need the name anymore, you can pfree that copy to release it. clean up after yourself, queen π
π ARGUMENTS π
Relation relβ the input relation. that's the one whose name you're tryna get π
β RETURN VALUE β
the name of the specified relation. literally that. no plot twist π
fr fr, don't forget the pfree when you're done β that copy isn't gonna free itself and your memory ain't infinite, iykyk π
and that's the whole page, bestie β written up in the PostgreSQL 18.6 docs, dated 2026, section 3, and it ate π β¨
π¦ 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