SPI_FNAME(3)
π 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 is1, 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
- opensuse-leap 16.0: postgresql15-docs 15.19-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