SPI_GETVALUE(3)
π NAME π
Okay bestie, welcome to SPI_GETVALUE(3) β the PostgreSQL 14.24 manual page for section 3, and it's literally about one thing: SPI_getvalue returns the string value of the specified column. No cap. π
β¨ SYNOPSIS β¨
char * SPI_getvalue(HeapTuple row, TupleDesc rowdesc, int colnumber)
π¦ DESCRIPTION π¦
So SPI_getvalue returns the string representation of the value of the specified column. It's giving βturn that column into a stringβ energy. β¨
The result comes back in memory allocated using palloc. (And yes, bestie, you can use pfree to release that memory when you don't need it anymore β clean up after yourself, icon behavior. π«Ά)
π ARGUMENTS π
HeapTuple rowβ the input row to be examined. Like, the row you're checking out. πTupleDesc rowdescβ the input row description. It's the row's little ID card. πͺͺint colnumberβ the column number (count starts at1). Periodt. π’
π RETURN VALUE π
You get the column value back β or NULL if the column is null, if colnumber is out of range (in that case SPI_result is set to SPI_ERROR_NOATTRIBUTE), or if no output function is available (then SPI_result is set to SPI_ERROR_NOOUTFUNC). So NULL is doing a lot of heavy lifting here, fr fr. π
That's the whole page, bestie π β source/version: PostgreSQL 14.24 Documentation, date: 2026, from the SPI_GETVALUE(3) manual. Now go forth and slay those column values. πβ¨
π¦ 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