Unsupported versions: 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the supported versions listed above instead.

SPI_execp

Name

SPI_execp -- Executes a plan from SPI_prepare

Synopsis

SPI_execp(plan,
values,
nulls,
tcount)

Inputs

void *plan

Execution plan

Datum *values

Actual parameter values

char *nulls

Array describing which parameters are NULLs

n indicates NULL (values[] entry ignored)
space indicates not NULL (values[] entry is valid)
int tcount

Number of tuples for which plan is to be executed

Outputs

int

Returns the same value as SPI_exec as well as

SPI_ERROR_ARGUMENT if plan is NULL or tcount < 0
SPI_ERROR_PARAM if values is NULL and plan was prepared with some parameters.
SPI_tuptable

initialized as in SPI_exec if successful

SPI_processed

initialized as in SPI_exec if successful

Description

SPI_execp executes a plan prepared by SPI_prepare. tcount has the same interpretation as in SPI_exec.

Usage

If nulls is NULL then SPI_execp assumes that all parameters (if any) are NOT NULL.

Note: If one of the objects (a relation, function, etc.) referenced by the prepared plan is dropped during your session (by your backend or another process) then the results of SPI_execp for this plan will be unpredictable.