SPI_EXEC...PARAMLIST(3)

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

✨ NAME ✨

Okay bestie, this is SPI_EXEC...PARAMLIST(3) β€” straight from the PostgreSQL 17.11 Documentation, and it's giving β€œexecute a statement prepared by SPI_prepare” energy. πŸ’…

SPI_execute_plan_with_paramlist β€” execute a statement prepared by SPI_prepare. Periodt.


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So SPI_execute_plan_with_paramlist executes a statement prepared by SPI_prepare. Literally that's the main character move. πŸ’–

This function is equivalent to SPI_execute_plan except that information 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. No cap. 🫢

⚠️ Heads up, bestie: this function is now deprecated in favor of SPI_execute_plan_extended. So it's still here, but it's lowkey in its legacy era. πŸ’€

πŸŽ€ ARGUMENTS πŸŽ€

  • SPIPlanPtr plan β€” the prepared statement, returned by SPI_prepare. Your main character plan. πŸ‘‘
  • ParamListInfo params β€” data structure containing parameter types and values; NULL if none. So if there are no params, pass NULL, simple as that. ✨
  • bool read_only β€” true for read-only execution. Keep it wholesome if you're just reading. 🌸
  • long count β€” maximum number of rows to return, or 0 for no limit. Zero means β€œgive me all the rows, bestie.” πŸ”₯

🌈 RETURN VALUE 🌈

The return value is the same as for SPI_execute_plan. Matching energy, matching result. πŸ’œ

SPI_processed and SPI_tuptable are set as in SPI_execute_plan if successful. So if it slays and succeeds, those get set the same way. πŸŽ€


With love, sparkle, and PostgreSQL 17.11 documentation vibes β€” dated 2026, bestie. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from