2 .\" Title: SPI_execute_plan
3 .\" Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
6 .\" Manual: PostgreSQL 18.0 Documentation
7 .\" Source: PostgreSQL 18.0
10 .TH "SPI_EXECUTE_PLAN" "3" "2025" "PostgreSQL 18.0" "PostgreSQL 18.0 Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 SPI_execute_plan \- execute a statement prepared by \fBSPI_prepare\fR
35 int SPI_execute_plan(SPIPlanPtr \fIplan\fR, Datum * \fIvalues\fR, const char * \fInulls\fR,
36 bool \fIread_only\fR, long \fIcount\fR)
40 \fBSPI_execute_plan\fR
41 executes a statement prepared by
43 or one of its siblings\&.
47 have the same interpretation as in
53 prepared statement (returned by
59 An array of actual parameter values\&. Must have same length as the statement\*(Aqs number of arguments\&.
62 const char * \fInulls\fR
64 An array describing which parameters are null\&. Must have same length as the statement\*(Aqs number of arguments\&.
71 \fBSPI_execute_plan\fR
72 assumes that no parameters are null\&. Otherwise, each entry of the
76 if the corresponding parameter value is non\-null, or
78 if the corresponding parameter value is null\&. (In the latter case, the actual value in the corresponding
80 entry doesn\*(Aqt matter\&.) Note that
82 is not a text string, just an array: it does not need a
90 for read\-only execution
95 maximum number of rows to return, or
101 The return value is the same as for
102 \fBSPI_execute\fR, with the following additional possible error (negative) results:
123 was prepared with some parameters