SPI_GETVALUE(3)

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

πŸ’– NAME πŸ’–

okay so welcome to the SPI_GETVALUE(3) page, bestie β€” this is all about SPI_getvalue, the function that returns the string value of the specified column. πŸŽ€

✨ SYNOPSIS ✨

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

🧚 DESCRIPTION 🧚

SPI_getvalue returns the string representation of the value of the specified column. slay. πŸ’…

The result is returned in memory allocated using palloc. (You can use pfree to release that memory when you don't need it anymore, bestie β€” no leaks, periodt.) 🫢

πŸŽ€ ARGUMENTS πŸŽ€

  • HeapTuple row β€” input row to be examined. πŸ‘€
  • TupleDesc rowdesc β€” input row description. it's giving context.
  • int colnumber β€” column number (count starts at 1, iykyk). πŸ”’

🌸 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). πŸ’€

xoxo, PostgreSQL 17.11 docs, 2026, page SPI_GETVALUE(3) β€” stay iconic πŸ’…βœ¨

πŸ“¦ where this page comes from