1SPI_IS_CURSOR_PLAN(3)   PostgreSQL 9.2.24 Documentation  SPI_IS_CURSOR_PLAN(3)
2
3
4

NAME

6       SPI_is_cursor_plan - return true if a statement prepared by SPI_prepare
7       can be used with SPI_cursor_open
8

SYNOPSIS

10       bool SPI_is_cursor_plan(SPIPlanPtr plan)
11

DESCRIPTION

13       SPI_is_cursor_plan returns true if a statement prepared by SPI_prepare
14       can be passed as an argument to SPI_cursor_open, or false if that is
15       not the case. The criteria are that the plan represents one single
16       command and that this command returns tuples to the caller; for
17       example, SELECT is allowed unless it contains an INTO clause, and
18       UPDATE is allowed only if it contains a RETURNING clause.
19

ARGUMENTS

21       SPIPlanPtr plan
22           prepared statement (returned by SPI_prepare)
23

RETURN VALUE

25       true or false to indicate if the plan can produce a cursor or not, with
26       SPI_result set to zero. If it is not possible to determine the answer
27       (for example, if the plan is NULL or invalid, or if called when not
28       connected to SPI), then SPI_result is set to a suitable error code and
29       false is returned.
30
31
32
33PostgreSQL 9.2.24                 2017-11-06             SPI_IS_CURSOR_PLAN(3)
Impressum