| The PostgreSQL 9.0 Reference Manual - Volume 2 - Programming Guide
by The PostgreSQL Global Development Group Paperback (6"x9"), 478 pages ISBN 9781906966065 RRP £14.95 ($19.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
13.1.13 SPI_is_cursor_plan
Name
SPI_is_cursor_plan -- return true if a plan
prepared by SPI_prepare can be used with
SPI_cursor_open
Synopsis
bool SPI_is_cursor_plan(SPIPlanPtr plan)
Description
SPI_is_cursor_plan returns true
if a plan prepared by SPI_prepare can be passed
as an argument to SPI_cursor_open, or
false if that is not the case. The criteria are that the
plan represents one single command and that this
command returns tuples to the caller; for example, SELECT
is allowed unless it contains an INTO clause, and
UPDATE is allowed only if it contains a RETURNING
clause.
Arguments
SPIPlanPtrplan-
execution plan (returned by
SPI_prepare)
Return Value
true or false to indicate if the
plan can produce a cursor or not, with
SPI_result set to zero.
If it is not possible to determine the answer (for example,
if the plan is NULL or invalid,
or if called when not connected to SPI), then
SPI_result is set to a suitable error code
and false is returned.
| ISBN 9781906966065 | The PostgreSQL 9.0 Reference Manual - Volume 2 - Programming Guide | See the print edition |