SPI_GETTYPE(3)

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

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to SPI_GETTYPE(3) from the PostgreSQL 17.11 Documentation β€” it's literally the function that returns the data type name of the specified column. no cap. πŸ’…


✨ SYNOPSIS ✨

char * SPI_gettype(TupleDesc rowdesc, int colnumber)

🌸 DESCRIPTION 🌸

SPI_gettype returns a copy of the data type name of the specified column. that's the whole vibe, and it ate. 🫢

and because it's a copy, you can use pfree to release the copy of the name when you don't need it anymore. free your little string, bestie β€” it deserves closure. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • TupleDesc rowdesc β€” the input row description. this is the row desc you're passing in, periodt. πŸ‘‘
  • int colnumber β€” the column number. count starts at 1, so no zero-index shenanigans here. ✨

πŸ’– RETURN VALUE πŸ’–

it returns the data type name of the specified column, or NULL on error. 😭

on error, SPI_result is set to SPI_ERROR_NOATTRIBUTE. keep an eye on that, iykyk. πŸ”₯


okay that's the whole page, bestie πŸ’œ β€” big sign-off from the PostgreSQL 17.11 docs, dated 2026, and from SPI_GETTYPE(3) itself. 🫢✨

πŸ“¦ where this page comes from