SPI_FNAME(3)

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

πŸŽ€ SPI_FNAME(3) πŸŽ€

okay bestie, this one is straight from the PostgreSQL 16.15 Documentation β€” it’s giving β€œfind the column name” energy and it’s lowkey iconic.

🌸 NAME 🌸

SPI_fname β€” determine the column name for the specified column number.

✨ 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.) Obsessed, honestly.

🫢 ARGUMENTS 🫢

  • TupleDesc rowdesc β€” input row description, fr fr.
  • int colnumber β€” column number (count starts at 1). Not zero, bestie β€” the count starts at one.

πŸ‘‘ RETURN VALUE πŸ‘‘

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


That’s the whole vibe, bestie πŸ’… β€” source/version is PostgreSQL 16.15, dated 2026. Mwah, go slay your column-name lookup. πŸŽ€

πŸ“¦ where this page comes from