SPI_FNAME(3)

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

πŸŽ€ NAME πŸŽ€

SPI_fname β€” determine the column name for the specified column number, bestie. πŸ’…

✨ SYNOPSIS ✨

char * SPI_fname(TupleDesc rowdesc, int colnumber)

πŸ’– DESCRIPTION πŸ’–

okay so SPI_fname returns a copy of the column name of the specified column. no cap, it's a copy β€” and when you don't need it anymore, you can use pfree to release the copy of the name. 🫢

🌸 ARGUMENTS 🌸

  • TupleDesc rowdesc β€” input row description, bestie. πŸ¦‹
  • int colnumber β€” column number, and heads up: the count starts at 1. ✨

πŸ‘‘ RETURN VALUE πŸ‘‘

The column name, periodt. If colnumber is out of range, you get NULL. 😭 And on error, SPI_result is set to SPI_ERROR_NOATTRIBUTE. πŸ’€


πŸ’– From the PostgreSQL 13.23 Documentation, dated 2025 β€” mwah, bye bestie! πŸ’–

πŸ“¦ where this page comes from