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
- opensuse-leap 16.0: postgresql18-docs 18.6-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms