SPI_CURSOR_OPEN_WITH_PARAMLIST(3pg14)

πŸ“¦ version 14.24, in opensuse-leap 16.0

πŸŽ€ 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, or NULL to let the system select a name πŸŽ€
  • SPIPlanPtr plan β€” prepared statement (returned by SPI_prepare) ⭐
  • ParamListInfo params β€” data structure containing parameter types and values; NULL if none πŸ¦‹
  • bool read_only β€” true for 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