SPI_FNAME(3)

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

✨ SPI_FNAME ✨

okay so bestie, welcome to the SPI_FNAME manual page β€” section 3, the one and only. She's here to help you determine the column name for the specified column number, and honestly? iconic. πŸ’…


πŸ’– NAME πŸ’–

SPI_fname β€” determine the column name for the specified column number. That's the whole gig, bestie. ✨

πŸ“œ SYNOPSIS πŸ“œ

char * SPI_fname(TupleDesc rowdesc, int colnumber)

🌸 DESCRIPTION 🌸

SPI_fname returns a copy of the column name of the specified column. (You can use pfree to release the copy of the name when you don't need it anymore.) Like, she hands you a fresh little copy β€” not the original β€” so don't forget to pfree it when you're done, or it's giving leaky vibes. 🫢

πŸŽ€ ARGUMENTS πŸŽ€

  • TupleDesc rowdesc β€” input row description. The row desc you're passing in, periodt. ✨
  • int colnumber β€” column number (count starts at 1). Bestie, the count starts at 1 β€” not 0 β€” so keep that in mind, iykyk. πŸ’…

πŸ‘‘ RETURN VALUE πŸ‘‘

The column name; NULL if colnumber is out of range. SPI_result set to SPI_ERROR_NOATTRIBUTE on error.

🚨 Heads up: if colnumber is out of range you get NULL, and on error SPI_result is set to SPI_ERROR_NOATTRIBUTE. No cap.

okay that's the whole page, bestie β€” from PostgreSQL 14.24 Documentation, dated 2026, and the manual page is SPI_FNAME(3). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from