SPI_EXEC...PARAMLIST(3)

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

✨ SPI_EXEC...PARAMLIST ✨

okay bestie, welcome to the PostgreSQL 18.6 docs, page for SPI_execute_plan_with_paramlist πŸ’– this one lives in the SPI_EXEC...PARAMLIST(3) manual, section 3, and it's giving "I run your prepared statements but with a lil twist" energy πŸŽ€


🌸 NAME 🌸

SPI_execute_plan_with_paramlist β€” execute a statement prepared by SPI_prepare πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int SPI_execute_plan_with_paramlist(SPIPlanPtr plan,
                                    ParamListInfo params,
                                    bool read_only,
                                    long count)

like look at her, four args, iconic, no notes πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

so basically SPI_execute_plan_with_paramlist runs a statement that was prepped by SPI_prepare, fr fr. This function is equivalent to SPI_execute_plan except that the info about the parameter values getting passed to the query is presented differently 🫢

the ParamListInfo representation is lowkey convenient when you already have values chillin' in that format β€” just hand 'em over, no conversion drama πŸ’…

and it also supports use of dynamic parameter sets via hook functions specified in ParamListInfo ✨ which is a whole vibe.

ngl this function is now deprecated in favor of SPI_execute_plan_extended πŸ’€ it still works but like… the newer one is the main character now. use that one bestie.

🌈 ARGUMENTS 🌈

  • SPIPlanPtr plan β€” your prepared statement, aka the thing that was returned by SPI_prepare πŸŽ€
  • ParamListInfo params β€” the data structure holding the parameter types and values; pass NULL if there are none πŸ™ˆ
  • bool read_only β€” true for read-only execution, so she behaves herself and doesn't write anything πŸ’–
  • long count β€” the maximum number of rows to return, or 0 for no limit (go off, unlimited queen πŸ‘‘)

⭐ RETURN VALUE ⭐

the return value is the same as for SPI_execute_plan β€” no surprises, same energy πŸ¦‹

SPI_processed and SPI_tuptable are set as in SPI_execute_plan if it succeeds ✨


mwah πŸ’‹ that's the whole page. sourced straight from the PostgreSQL 18.6 docs, dated 2026, and yeah β€” this is the SPI_EXEC...PARAMLIST(3) manual page, we ate and left no crumbs πŸ“

πŸ“¦ where this page comes from