SPI_CURSOR_OPEN_WITH_PARAMLIST(3pg14)
π NAME π
okay so bestie, welcome to the SPI_cursor_open_with_paramlist page β manual section 3pg14 β and itβs literally giving βcursor setup, but make it parameter-list flavoredβ π
β¨
SPI_cursor_open_with_paramlist β set up a cursor using parameters π¦
β¨ SYNOPSIS β¨
Portal SPI_cursor_open_with_paramlist(const char *name,
SPIPlanPtr plan,
ParamListInfo params,
bool read_only)
π DESCRIPTION π
so SPI_cursor_open_with_paramlist sets up a cursor β internally, a portal β that will execute a statement prepared by SPI_prepare. itβs equivalent to SPI_cursor_open except that the info about the parameter values to be passed to the query is presented differently. the ParamListInfo representation can be convenient for passing down values that are already available in that format. it also supports use of dynamic parameter sets via hook functions specified in ParamListInfo π«Ά
the passed-in parameter data will be copied into the cursorβs portal, so it can be freed while the cursor still exists. no cap, thatβs the vibe π
πΈ ARGUMENTS πΈ
const char * nameβ name for portal, orNULLto let the system select a name πSPIPlanPtr planβ prepared statement (returned bySPI_prepare) βParamListInfo paramsβ data structure containing parameter types and values;NULLif none π¦bool read_onlyβtruefor read-only execution β
π RETURN VALUE π
Pointer to portal containing the cursor. note there is no error return convention; any error will be reported via elog πβ¨
mwah π β this page is from PostgreSQL 14.24 and dated 2026, so take that cursor energy and slay, bestie π«Άπ
π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql14-docs 14.24-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms