SPI_FNAME(3)

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

πŸ’… SPI_FNAME(3) πŸ’…

Okay bestie, we're in the PostgreSQL 15.19 Documentation, and this page is literally about SPI_fname β€” the function that determines the column name for the specified column number. Slay. ✨

🌸 NAME 🌸

SPI_fname β€” determine the column name for the specified column number, fr fr. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

char * SPI_fname(TupleDesc rowdesc, int colnumber)

πŸ’– DESCRIPTION πŸ’–

Okay so SPI_fname returns a copy of the column name of the specified column. It's giving "hand me the column number, I'll hand you the name." πŸ‘‘

And yes, you can use pfree to release the copy of the name when you don't need it anymore. Don't forget, bestie β€” free your copy, keep your peace. 🫢

πŸ“ ARGUMENTS πŸ“

  • TupleDesc rowdesc β€” input row description, the row-desc bestie you're passing in. 🌈
  • int colnumber β€” column number (count starts at 1, so the first column is 1, iykyk). ✨

πŸ”₯ RETURN VALUE πŸ”₯

The column name; NULL if colnumber is out of range. SPI_result set to SPI_ERROR_NOATTRIBUTE on error. That's the whole vibe check. πŸ’€


PostgreSQL 15.19 Documentation Β· 2026 Β· mwah, bestie πŸ’‹πŸŽ€

πŸ“¦ where this page comes from