©
This document usesPHP Chinese website manualRelease
SPI_prepare
can be used with
SPI_cursor_open
bool SPI_is_cursor_plan(SPIPlanPtrplan)
SPI_is_cursor_plan
returnstrueif a plan prepared bySPI_prepare
can be passed as an argument toSPI_cursor_open
, orfalseif that is not the case. The criteria are that theplanrepresents one single command and that this command returns tuples to the caller; for example,SELECTis allowed unless it contains anINTOclause, andUPDATEis allowed only if it contains aRETURNINGclause.
execution plan (returned bySPI_prepare
)
trueorfalseto indicate if theplancan produce a cursor or not, withSPI_resultset to zero. If it is not possible to determine the answer (for example, if theplanisNULLor invalid, or if called when not connected to SPI), thenSPI_resultis set to a suitable error code andfalseis returned.