SPI_GETBINVAL(3)

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

✨ SPI_GETBINVAL(3) ✨

okay bestie, welcome to SPI_GETBINVAL(3) from the PostgreSQL 17.11 Documentation πŸ’– this one is lowkey iconic and honestly pretty chill once you get the vibe.

🌸 NAME 🌸

SPI_getbinval β€” return the binary value of the specified column ✨

πŸŽ€ SYNOPSIS πŸŽ€

Datum SPI_getbinval(HeapTuple row, TupleDesc rowdesc, int colnumber,
                    bool * isnull)

πŸ’… DESCRIPTION πŸ’…

okay so SPI_getbinval returns the value of the specified column in the internal form (as type Datum). slay.

this function does not allocate new space for the datum. and in the case of a pass-by-reference data type, the return value will be a pointer into the passed row. no cap, that part matters 🫢

πŸ¦‹ ARGUMENTS πŸ¦‹

  • HeapTuple row β€” input row to be examined πŸ‘€
  • TupleDesc rowdesc β€” input row description
  • int colnumber β€” column number (count starts at 1, bestie, not 0)
  • bool * isnull β€” flag for a null value in the column

🌈 RETURN VALUE 🌈

the binary value of the column is returned ✨ the variable pointed to by isnull is set to true if the column is null, else to false.

SPI_result is set to SPI_ERROR_NOATTRIBUTE on error. πŸ’€


and that’s the whole vibe πŸ’– huge shoutout to the PostgreSQL 17.11 crew β€” page dated 2026, mwah πŸ’‹

πŸ“¦ where this page comes from