SPI_GETVALUE(3)

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

πŸ’– NAME πŸ’–

bestie, welcome to the SPI_GETVALUE(3) page from the PostgreSQL 16.15 Documentation β€” manual name folded in near the top, we move πŸ’….

SPI_getvalue β€” return the string value of the specified column ✨. that's the name, that's the job, no cap.

🌸 SYNOPSIS 🌸

char * SPI_getvalue(HeapTuple row, TupleDesc rowdesc, int colnumber)

that's the exact signature, character for character. don't @ me 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

SPI_getvalue returns the string representation of the value of the specified column.

The result is returned in memory allocated using palloc. (You can use pfree to release the memory when you don't need it anymore.) 🧚

πŸŽ€ ARGUMENTS πŸŽ€

  • HeapTuple row β€” input row to be examined πŸ‘€
  • TupleDesc rowdesc β€” input row description πŸŽ€
  • int colnumber β€” column number (count starts at 1) πŸ”’

πŸ”₯ RETURN VALUE πŸ”₯

Column value, or NULL if the column is null, colnumber is out of range (SPI_result is set to SPI_ERROR_NOATTRIBUTE), or no output function is available (SPI_result is set to SPI_ERROR_NOOUTFUNC).

so yeah, bestie: you get the column value when it works, and NULL in those exact three situations. 😭 that's the whole vibe check.


mwah πŸ’‹ β€” this was the SPI_GETVALUE(3) page from PostgreSQL 16.15, dated 2026. go forth and get those values, icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from