SPI_GETTYPE(3)
π 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
- opensuse-leap 16.0: postgresql17-docs 17.11-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