SPI_GETTYPEID(3)
okay so bestie, welcome to SPI_GETTYPEID(3) β the PostgreSQL 15.19 manual page that's literally about grabbing a column's data type OID β¨
π NAME π
SPI_gettypeidβ return the data type OID of the specified column π
β¨ SYNOPSIS β¨
Oid SPI_gettypeid(TupleDesc rowdesc, int colnumber)
π¦ DESCRIPTION π¦
So like, SPI_gettypeid does exactly one iconic thing: it returns the OID of the data type of the specified column. That's the whole slay. No cap π
πΈ ARGUMENTS πΈ
TupleDesc rowdescβ input row description. You're handing over the row description, bestie π«Άint colnumberβ column number (count starts at 1). Yes, the count starts at 1 β periodt π
π RETURN VALUE π
You get back the OID of the data type of the specified column, or InvalidOid on error. And on error? SPI_result is set to SPI_ERROR_NOATTRIBUTE. That's the vibe check ππ₯
okay bye bestie, this page came from PostgreSQL 15.19 and was dated 2026 β mwah ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15-docs 15.19-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