SPI_GETTYPEID(3)

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

πŸ’– NAME πŸ’–

okay bestie, welcome to the SPI_GETTYPEID(3) page from the PostgreSQL 17.11 Documentation ✨ SPI_gettypeid β€” return the data type OID of the specified column. That's literally the whole assignment πŸŽ€


🌸 SYNOPSIS 🌸

Oid SPI_gettypeid(TupleDesc rowdesc, int colnumber)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: SPI_gettypeid returns the OID of the data type of the specified column. no cap, that's the whole function. iconic query energy πŸ’…

πŸ’œ ARGUMENTS πŸ’œ

  • TupleDesc rowdesc β€” input row description. yes, it's the row desc you're feeding in 🫢
  • int colnumber β€” column number (count starts at 1). bestie, count starts at 1, noted 🌸

⭐ RETURN VALUE ⭐

The OID of the data type of the specified column or InvalidOid on error. On error, SPI_result is set to SPI_ERROR_NOATTRIBUTE. so if it's mad, you get InvalidOid, and SPI_result is set to SPI_ERROR_NOATTRIBUTE β€” fr fr, that's the error signal 😭


cute sign-off: this page is from PostgreSQL 17.11, dated 2026, and it's the SPI_GETTYPEID(3) manual page. slay, go call your OIDs bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from