SPI_EXECP(3)
β¨ SPI_EXECP(3) β¨
okay so bestie, welcome to the tea on SPI_EXECP(3) β it's a page from the PostgreSQL 14.24 Documentation and honestly it's giving "short but mighty" π
πΈ NAME πΈ
SPI_execp β execute a statement in read/write mode π₯
π SYNOPSIS π
int SPI_execp(SPIPlanPtr plan, Datum * values, const char * nulls, long count)
π¦ DESCRIPTION π¦
okay so SPI_execp is literally the same as SPI_execute_plan, except that the read_only parameter of that other function is always taken as false. periodt. that's the whole vibe β you're in read/write mode, no cap π
π ARGUMENTS π
SPIPlanPtr planβ the prepared statement, which you get back fromSPI_prepareπ«ΆDatum * valuesβ an array of the actual parameter values you're passing in. it has to have the same length as the statement's number of arguments, fr fr.const char * nullsβ an array that describes which parameters are null. also has to have the same length as the statement's number of arguments β¨
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. (and in that null case? the actual value in the corresponding values entry doesn't matter, so don't stress π)
heads up bestie:nullsis not a text string, it's just an array β so it does not need a'\0'terminator. it's giving "array not string" energy, iykyk β
long countβ maximum number of rows to return, or0for no limit π
π RETURN VALUE π
see SPI_execute_plan β that's where the return value tea lives π
SPI_processed and SPI_tuptable are set as in SPI_execute if successful β¨
and that's the whole page, bestie β short, sweet, and iconic π sign-off time: this one's from PostgreSQL 14.24, dated 2026 β slay π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14-docs 14.24-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