1SPI_CURSOR_OPEN_WITH_PARAPMoLsItSgTr(e3S)QL 9.2.24 DocuSmPeIn_tCaUtRiSoOnR_OPEN_WITH_PARAMLIST(3)
2
3
4
6 SPI_cursor_open_with_paramlist - set up a cursor using parameters
7
9 Portal SPI_cursor_open_with_paramlist(const char *name,
10 SPIPlanPtr plan,
11 ParamListInfo params,
12 bool read_only)
13
15 SPI_cursor_open_with_paramlist sets up a cursor (internally, a portal)
16 that will execute a statement prepared by SPI_prepare. This function is
17 equivalent to SPI_cursor_open except that information about the
18 parameter values to be passed to the query is presented differently.
19 The ParamListInfo representation can be convenient for passing down
20 values that are already available in that format. It also supports use
21 of dynamic parameter sets via hook functions specified in
22 ParamListInfo.
23
24 The passed-in parameter data will be copied into the cursor's portal,
25 so it can be freed while the cursor still exists.
26
28 const char * name
29 name for portal, or NULL to let the system select a name
30
31 SPIPlanPtr plan
32 prepared statement (returned by SPI_prepare)
33
34 ParamListInfo params
35 data structure containing parameter types and values; NULL if none
36
37 bool read_only
38 true for read-only execution
39
41 Pointer to portal containing the cursor. Note there is no error return
42 convention; any error will be reported via elog.
43
44
45
46PostgreSQL 9.2.24 2017-11-06 SPI_CURSOR_OPEN_WITH_PARAMLIST(3)