SPI_GETTYPEID(3)
β¨ NAME β¨
SPI_gettypeid β bestie, this is the SPI_GETTYPEID(3) page, and it does exactly one iconic thing: it returns the data type OID of the specified column. No cap, that's the whole vibe.
πΈ SYNOPSIS πΈ
Oid SPI_gettypeid(TupleDesc rowdesc, int colnumber)
π DESCRIPTION π
Okay so SPI_gettypeid literally returns the OID of the data type of the specified column. That's it. It's giving "small function, clear purpose," and we love that for us. π
π ARGUMENTS π
TupleDesc rowdescβ the input row description, aka the row info you're handing over. π«Άint colnumberβ the column number. Heads up bestie: the count starts at1, not0. Fr fr. π
π₯ RETURN VALUE π₯
You get the OID of the data type of the specified column, or InvalidOid on error. On error, SPI_result is set to SPI_ERROR_NOATTRIBUTE. That's the fail state, and now you know exactly what it means. π
That's the whole page, bestie β source/version: PostgreSQL 14.24 Documentation, date: 2026. Slay and stay type-safe. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14-docs 14.24-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