SPI_GETARGTYPEID(3)
okay so welcome to SPI_GETARGTYPEID(3), bestie β this is one of those little PostgreSQL 17.11 documentation pages, and it's lowkey a tiny helper. Let's get into it π
π NAME π
SPI_getargtypeid β return the data type OID for an argument of a statement prepared by SPI_prepare
β¨ SYNOPSIS β¨
Oid SPI_getargtypeid(SPIPlanPtr plan, int argIndex)
π¦ DESCRIPTION π¦
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. No cap, zero-based indexing is the main character here π
πΈ ARGUMENTS πΈ
SPIPlanPtr planβ the prepared statement, returned bySPI_prepareint argIndexβ the zero based index of the argument
π RETURN VALUE π
The type OID of the argument at the given index.
but bestie, watch out: if the plan isNULLor invalid, orargIndexis less than0or not less than the number of arguments declared for the plan,SPI_resultis set toSPI_ERROR_ARGUMENTandInvalidOidis returned π
signing off from the PostgreSQL 17.11 docs, dated 2026, on the SPI_GETARGTYPEID(3) page β slay and read your manpages responsibly π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql17-docs 17.11-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