SPI_FNAME(3)
β¨ 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 at1β not0β 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: ifcolnumberis out of range you getNULL, and on errorSPI_resultis set toSPI_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
- opensuse-leap 16.0: postgresql14-docs 14.24-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms