SPI_EXECP(3)

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

πŸ’– NAME

okay so bestie, this is the SPI_EXECP(3) page from the PostgreSQL 15.19 docs, and it's literally about SPI_execp β€” the function that executes a statement in read/write mode. periodt. 🫢

✨ SYNOPSIS

int SPI_execp(SPIPlanPtr plan, Datum * values, const char * nulls, long count)

πŸ¦‹ DESCRIPTION

SPI_execp is the same as SPI_execute_plan, except the latter's read_only parameter is always taken as false. so yeah, read/write mode is the vibe here, no cap. πŸ’…

πŸŽ€ ARGUMENTS

  • SPIPlanPtr plan β€” a prepared statement, returned by SPI_prepare.
  • Datum * values β€” an array of actual parameter values. it must have the same length as the statement's number of arguments.
  • const char * nulls β€” an array describing which parameters are null. it also must have the same length as the statement's number of arguments. here's the tea:
    • if nulls is NULL, then SPI_execp assumes that no parameters are null.
    • otherwise, each entry of the nulls array should be ' ' if the corresponding parameter value is non-null, or 'n' if the corresponding parameter value is null. (in that null case, the actual value in the corresponding values entry doesn't matter.)
    • lowkey important: nulls is not a text string, just an array β€” it does not need a '\0' terminator. iykyk.
  • long count β€” maximum number of rows to return, or 0 for no limit.

🌈 RETURN VALUE

  • see SPI_execute_plan.
  • SPI_processed and SPI_tuptable are set as in SPI_execute if successful. slay.

that's the whole page, bestie! πŸ’– this iconic manual page is from PostgreSQL 15.19, dated 2026 β€” SPI_EXECP(3) out! 🫢✨

πŸ“¦ where this page comes from