SPI_GETRELNAME(3)

πŸ“¦ version 18.6, in opensuse-leap 16.0

✨ 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