SPI_GETVALUE(3)
π NAME π
okay bestie, welcome to the SPI_GETVALUE(3) manual page β this one is all about SPI_getvalue, the function that returns the string value of the specified column. slay. β¨
π¦ SYNOPSIS π¦
char * SPI_getvalue(HeapTuple row, TupleDesc rowdesc, int colnumber)
πΈ DESCRIPTION πΈ
SPI_getvalue returns the string representation of the value of the specified column. That's the whole vibe, no cap.
The result comes back in memory allocated using palloc. (You can use pfree to release the memory when you don't need it anymore β very demure, very mindful. π
)
π ARGUMENTS π
HeapTuple rowβ the input row to be examined.TupleDesc rowdescβ the input row description.int colnumberβ the column number (count starts at 1).
π RETURN VALUE π
You get the column value back β icon behavior β or NULL if the column is null, if colnumber is out of range (SPI_result is set to SPI_ERROR_NOATTRIBUTE), or if no output function is available (SPI_result is set to SPI_ERROR_NOOUTFUNC). Not me getting a whole error code for those cases. π
with love and PostgreSQL 15.19 docs energy, your Unix bestie β dated 2026 π«Ά
π¦ 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