©
This document usesPHP Chinese website manualRelease
SPI_preparecan be used with
SPI_cursor_open
bool SPI_is_cursor_plan(SPIPlanPtrplan)
SPI_is_cursor_planreturnstrueif a plan prepared bySPI_preparecan 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.