]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_execp.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_execp.3
1 '\" t
2 .\"     Title: SPI_execp
3 .\"    Author: The PostgreSQL Global Development Group
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\"      Date: 2025
6 .\"    Manual: PostgreSQL 18.0 Documentation
7 .\"    Source: PostgreSQL 18.0
8 .\"  Language: English
9 .\"
10 .TH "SPI_EXECP" "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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 SPI_execp \- execute a statement in read/write mode
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 int SPI_execp(SPIPlanPtr \fIplan\fR, Datum * \fIvalues\fR, const char * \fInulls\fR, long \fIcount\fR)
36 .fi
37 .SH "DESCRIPTION"
38 .PP
39 \fBSPI_execp\fR
40 is the same as
41 \fBSPI_execute_plan\fR, with the latter\*(Aqs
42 \fIread_only\fR
43 parameter always taken as
44 false\&.
45 .SH "ARGUMENTS"
46 .PP
47 SPIPlanPtr \fIplan\fR
48 .RS 4
49 prepared statement (returned by
50 \fBSPI_prepare\fR)
51 .RE
52 .PP
53 Datum * \fIvalues\fR
54 .RS 4
55 An array of actual parameter values\&. Must have same length as the statement\*(Aqs number of arguments\&.
56 .RE
57 .PP
58 const char * \fInulls\fR
59 .RS 4
60 An array describing which parameters are null\&. Must have same length as the statement\*(Aqs number of arguments\&.
61 .sp
62 If
63 \fInulls\fR
64 is
65 NULL
66 then
67 \fBSPI_execp\fR
68 assumes that no parameters are null\&. Otherwise, each entry of the
69 \fInulls\fR
70 array should be
71 \*(Aq\ \&\*(Aq
72 if the corresponding parameter value is non\-null, or
73 \*(Aqn\*(Aq
74 if the corresponding parameter value is null\&. (In the latter case, the actual value in the corresponding
75 \fIvalues\fR
76 entry doesn\*(Aqt matter\&.) Note that
77 \fInulls\fR
78 is not a text string, just an array: it does not need a
79 \*(Aq\e0\*(Aq
80 terminator\&.
81 .RE
82 .PP
83 long \fIcount\fR
84 .RS 4
85 maximum number of rows to return, or
86 0
87 for no limit
88 .RE
89 .SH "RETURN VALUE"
90 .PP
91 See
92 \fBSPI_execute_plan\fR\&.
93 .PP
94 \fISPI_processed\fR
95 and
96 \fISPI_tuptable\fR
97 are set as in
98 \fBSPI_execute\fR
99 if successful\&.