2 .\" Title: SPI_prepare_cursor
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_PREPARE_CURSOR" "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_prepare_cursor \- prepare a statement, without executing it yet
35 SPIPlanPtr SPI_prepare_cursor(const char * \fIcommand\fR, int \fInargs\fR,
36 Oid * \fIargtypes\fR, int \fIcursorOptions\fR)
40 \fBSPI_prepare_cursor\fR
42 \fBSPI_prepare\fR, except that it also allows specification of the planner\*(Aqs
43 \(lqcursor options\(rq
44 parameter\&. This is a bit mask having the values shown in
51 always takes the cursor options as zero\&.
53 This function is now deprecated in favor of
54 \fBSPI_prepare_extended\fR\&.
57 const char * \fIcommand\fR
64 number of input parameters ($1,
70 pointer to an array containing the
71 OIDs of the data types of the parameters
74 int \fIcursorOptions\fR
76 integer bit mask of cursor options; zero produces default behavior
80 \fBSPI_prepare_cursor\fR
81 has the same return conventions as
91 CURSOR_OPT_GENERIC_PLAN, and
92 CURSOR_OPT_CUSTOM_PLAN\&. Note in particular that