postgresql_16:6.10.1.14.3 Return Value
PostgreSQL 16 > Server Programming > Server Programming Interface > Interface Functions > SPI_execute_plan > Return Value
The return value is the same as for SPI_execute, with the following additional possible error (negative) results: SPI_ERROR_ARGUMENT if plan is NULL or invalid, or count is less than 0 SPI_ERROR_PARAM if values is NULL and plan was prepared with some parameters
SPI_processed and SPI_tuptable are set as in SPI_execute if successful.