SPI_preparecan be used with
true if a statement prepared by
SPI_prepare can be passed as an
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.
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.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.