]> begriffs open source - ai-pg/blob - full-docs/man3/SPI_prepare_params.3
Include links to all subsection html pages, with shorter paths too
[ai-pg] / full-docs / man3 / SPI_prepare_params.3
1 '\" t
2 .\"     Title: SPI_prepare_params
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_PREPARE_PARAMS" "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_prepare_params \- prepare a statement, without executing it yet
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 SPIPlanPtr SPI_prepare_params(const char * \fIcommand\fR,
36                               ParserSetupHook \fIparserSetup\fR,
37                               void * \fIparserSetupArg\fR,
38                               int \fIcursorOptions\fR)
39 .fi
40 .SH "DESCRIPTION"
41 .PP
42 \fBSPI_prepare_params\fR
43 creates and returns a prepared statement for the specified command, but doesn\*(Aqt execute the command\&. This function is equivalent to
44 \fBSPI_prepare_cursor\fR, with the addition that the caller can specify parser hook functions to control the parsing of external parameter references\&.
45 .PP
46 This function is now deprecated in favor of
47 \fBSPI_prepare_extended\fR\&.
48 .SH "ARGUMENTS"
49 .PP
50 const char * \fIcommand\fR
51 .RS 4
52 command string
53 .RE
54 .PP
55 ParserSetupHook \fIparserSetup\fR
56 .RS 4
57 Parser hook setup function
58 .RE
59 .PP
60 void * \fIparserSetupArg\fR
61 .RS 4
62 pass\-through argument for
63 \fIparserSetup\fR
64 .RE
65 .PP
66 int \fIcursorOptions\fR
67 .RS 4
68 integer bit mask of cursor options; zero produces default behavior
69 .RE
70 .SH "RETURN VALUE"
71 .PP
72 \fBSPI_prepare_params\fR
73 has the same return conventions as
74 \fBSPI_prepare\fR\&.