SPI_GETTYPEID(3)

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

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