]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_execute_plan_with_paramlist.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_execute_plan_with_paramlist.3
1 '\" t
2 .\"     Title: SPI_execute_plan_with_paramlist
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_EXECUTE_PLAN_WITH_PARAMLIST" "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_execute_plan_with_paramlist \- execute a statement prepared by \fBSPI_prepare\fR
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 int SPI_execute_plan_with_paramlist(SPIPlanPtr \fIplan\fR,
36                                     ParamListInfo \fIparams\fR,
37                                     bool \fIread_only\fR,
38                                     long \fIcount\fR)
39 .fi
40 .SH "DESCRIPTION"
41 .PP
42 \fBSPI_execute_plan_with_paramlist\fR
43 executes a statement prepared by
44 \fBSPI_prepare\fR\&. This function is equivalent to
45 \fBSPI_execute_plan\fR
46 except that information about the parameter values to be passed to the query is presented differently\&. The
47 ParamListInfo
48 representation can be convenient for passing down values that are already available in that format\&. It also supports use of dynamic parameter sets via hook functions specified in
49 ParamListInfo\&.
50 .PP
51 This function is now deprecated in favor of
52 \fBSPI_execute_plan_extended\fR\&.
53 .SH "ARGUMENTS"
54 .PP
55 SPIPlanPtr \fIplan\fR
56 .RS 4
57 prepared statement (returned by
58 \fBSPI_prepare\fR)
59 .RE
60 .PP
61 ParamListInfo \fIparams\fR
62 .RS 4
63 data structure containing parameter types and values; NULL if none
64 .RE
65 .PP
66 bool \fIread_only\fR
67 .RS 4
68 true
69 for read\-only execution
70 .RE
71 .PP
72 long \fIcount\fR
73 .RS 4
74 maximum number of rows to return, or
75 0
76 for no limit
77 .RE
78 .SH "RETURN VALUE"
79 .PP
80 The return value is the same as for
81 \fBSPI_execute_plan\fR\&.
82 .PP
83 \fISPI_processed\fR
84 and
85 \fISPI_tuptable\fR
86 are set as in
87 \fBSPI_execute_plan\fR
88 if successful\&.