SPI_PREPARE_PARAMS(3)

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

πŸ’… SPI_PREPARE_PARAMS(3) β€” prepare a statement, without executing it yet πŸ’…

okay bestie, welcome to the SPI_PREPARE_PARAMS(3) page from the PostgreSQL 16.15 documentation. this is the β€œget your prepared statement ready but do not run it yet” situation β€” prep only, no execution, main character energy. πŸ’–


🌸 NAME 🌸

SPI_prepare_params β€” prepare a statement, without executing it yet


✨ SYNOPSIS ✨

SPIPlanPtr SPI_prepare_params(const char * command,
                              ParserSetupHook parserSetup,
                              void * parserSetupArg,
                              int cursorOptions)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so SPI_prepare_params creates and returns a prepared statement for the command you specified, but it does not execute the command. literally preparing, not performing. no cap.

this function is equivalent to SPI_prepare_cursor, with the addition that the caller can specify parser hook functions to control the parsing of external parameter references. iykyk β€” parser hooks are the little backstage crew here. πŸŽ€

heads up, bestie: this function is now deprecated in favor of SPI_prepare_extended. it still exists, but the manual is lowkey saying β€œmove on, babe.” πŸ’…

🌈 ARGUMENTS 🌈

  • const char * command β€” command string
  • ParserSetupHook parserSetup β€” parser hook setup function
  • void * parserSetupArg β€” pass-through argument for parserSetup
  • int cursorOptions β€” integer bit mask of cursor options; zero produces default behavior

⭐ RETURN VALUE ⭐

SPI_prepare_params has the same return conventions as SPI_prepare. that's the whole return-value vibe, periodt. ✨


xoxo, PostgreSQL 16.15 documentation, 2026 πŸ’–

πŸ“¦ where this page comes from