1SPI_EXECUTE_PLAN(3) PostgreSQL 10.7 Documentation SPI_EXECUTE_PLAN(3)
2
3
4
6 SPI_execute_plan - execute a statement prepared by SPI_prepare
7
9 int SPI_execute_plan(SPIPlanPtr plan, Datum * values, const char * nulls,
10 bool read_only, long count)
11
13 SPI_execute_plan executes a statement prepared by SPI_prepare or one of
14 its siblings. read_only and count have the same interpretation as in
15 SPI_execute.
16
18 SPIPlanPtr plan
19 prepared statement (returned by SPI_prepare)
20
21 Datum * values
22 An array of actual parameter values. Must have same length as the
23 statement's number of arguments.
24
25 const char * nulls
26 An array describing which parameters are null. Must have same
27 length as the statement's number of arguments.
28
29 If nulls is NULL then SPI_execute_plan assumes that no parameters
30 are null. Otherwise, each entry of the nulls array should be ' ' if
31 the corresponding parameter value is non-null, or 'n' if the
32 corresponding parameter value is null. (In the latter case, the
33 actual value in the corresponding values entry doesn't matter.)
34 Note that nulls is not a text string, just an array: it does not
35 need a '\0' terminator.
36
37 bool read_only
38 true for read-only execution
39
40 long count
41 maximum number of rows to return, or 0 for no limit
42
44 The return value is the same as for SPI_execute, with the following
45 additional possible error (negative) results:
46
47 SPI_ERROR_ARGUMENT
48 if plan is NULL or invalid, or count is less than 0
49
50 SPI_ERROR_PARAM
51 if values is NULL and plan was prepared with some parameters
52
53 SPI_processed and SPI_tuptable are set as in SPI_execute if successful.
54
55
56
57PostgreSQL 10.7 2019 SPI_EXECUTE_PLAN(3)