RefLib

Reference library for AI

Back

postgresql_16:6.10.1.7.3 Return Value

PostgreSQL 16 > Server Programming > Server Programming Interface > Interface Functions > SPI_prepare > Return Value

SPI_prepare returns a non-null pointer to an SPIPlan, which is an opaque struct representing a prepared statement. On error, NULL will be returned, and SPI_result will be set to one of the same error codes used by SPI_execute, except that it is set to SPI_ERROR_ARGUMENT if command is NULL, or if nargs is less than 0, or if nargs is greater than 0 and argtypes is NULL.

Back