]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_cursor_open_with_paramlist.3
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / man3 / SPI_cursor_open_with_paramlist.3
1 '\" t
2 .\"     Title: SPI_cursor_open_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_CURSOR_OPEN_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_cursor_open_with_paramlist \- set up a cursor using parameters
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 Portal SPI_cursor_open_with_paramlist(const char *\fIname\fR,
36                                       SPIPlanPtr \fIplan\fR,
37                                       ParamListInfo \fIparams\fR,
38                                       bool \fIread_only\fR)
39 .fi
40 .SH "DESCRIPTION"
41 .PP
42 \fBSPI_cursor_open_with_paramlist\fR
43 sets up a cursor (internally, a portal) that will execute a statement prepared by
44 \fBSPI_prepare\fR\&. This function is equivalent to
45 \fBSPI_cursor_open\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 The passed\-in parameter data will be copied into the cursor\*(Aqs portal, so it can be freed while the cursor still exists\&.
52 .SH "ARGUMENTS"
53 .PP
54 const char * \fIname\fR
55 .RS 4
56 name for portal, or
57 NULL
58 to let the system select a name
59 .RE
60 .PP
61 SPIPlanPtr \fIplan\fR
62 .RS 4
63 prepared statement (returned by
64 \fBSPI_prepare\fR)
65 .RE
66 .PP
67 ParamListInfo \fIparams\fR
68 .RS 4
69 data structure containing parameter types and values; NULL if none
70 .RE
71 .PP
72 bool \fIread_only\fR
73 .RS 4
74 true
75 for read\-only execution
76 .RE
77 .SH "RETURN VALUE"
78 .PP
79 Pointer to portal containing the cursor\&. Note there is no error return convention; any error will be reported via
80 \fBelog\fR\&.