Supported Versions: Current (16) / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

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(void * 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 and false if that is not the case. The criteria are that the plan represents one single command and that this command is a SELECT without an INTO clause.

Arguments

void * plan

execution plan (returned by SPI_prepare)

Return Value

true or false to indicate if the plan can produce a cursor or not, or SPI_ERROR_ARGUMENT if the plan is NULL