SPI_GETARGTYPEID(3)

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

✨ SPI_GETARGTYPEID(3) β€” the PostgreSQL 16.15 Documentation page, but make it bestie-coded ✨

Okay so this is the manual page for SPI_getargtypeid, and it's giving β€œtell me the data type OID for an argument of a statement prepared by SPI_prepare” energy. πŸ’…


🌸 NAME 🌸

SPI_getargtypeid β€” return the data type OID for an argument of a statement prepared by SPI_prepare. No cap, that's literally the whole vibe. 🫢


πŸŽ€ SYNOPSIS πŸŽ€

Oid SPI_getargtypeid(SPIPlanPtr plan, int argIndex)

πŸ¦‹ DESCRIPTION πŸ¦‹

So SPI_getargtypeid returns the Oid representing the type for the argIndex'th argument of a statement prepared by SPI_prepare. First argument is at index zero. Yes bestie, zero is the first one β€” iconic indexing behavior, honestly. ✨


πŸ’– ARGUMENTS πŸ’–

  • SPIPlanPtr plan β€” prepared statement (returned by SPI_prepare) 🌈
  • int argIndex β€” zero based index of the argument πŸ“

πŸ‘‘ RETURN VALUE πŸ‘‘

The type OID of the argument at the given index. πŸ’œ

If the plan is NULL or invalid, or argIndex is less than 0 or not less than the number of arguments declared for the plan, SPI_result is set to SPI_ERROR_ARGUMENT and InvalidOid is returned. 🚨 Like, read that part twice, bestie β€” it's the important boundary-check tea. 😭


That's the whole page, fr fr πŸ’– β€” source/version: PostgreSQL 16.15, date: 2026, manual page: SPI_GETARGTYPEID(3). Periodt. πŸ’…

πŸ“¦ where this page comes from