SPI_CURSOR_OPEN_WITH_PARAMLIST(3pg16)
π SPI_CURSO...PARAMLIST(3) β the PostgreSQL 16.15 manual page, bestie π
β¨ NAME β¨
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 πΈ
Okay so SPI_cursor_open_with_paramlist sets up a cursor β internally, a portal β that will execute a statement prepared by SPI_prepare. It's literally equivalent to SPI_cursor_open, except that the info about the parameter values you're passing 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. Slay. β¨
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. π
π 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. π
Heads up, bestie: there is no error return convention here β any error will be reported via elog. π
π That's the tea: this page is from PostgreSQL 16.15, dated 2026, and it's the SPI_CURSO...PARAMLIST(3) manual page. Periodt. π
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16-docs 16.15-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