SPI_CURSOR_OPEN_WITH_PARAMLIST(3pg16)

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

πŸ’… 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, 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. πŸŽ€

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