SPI_PREPARE_PARAMS(3)

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

✨ NAME ✨

okay so bestie, this is SPI_prepare_params from the PostgreSQL 15.19 docs page SPI_PREPARE_PARAMS(3) β€” and the whole vibe is: it prepares a statement, but does not execute it yet. πŸ’…

SPI_prepare_params creates and returns a prepared statement for the command you give it, but it does not execute that command. Not even a little. 🫢


πŸ¦‹ 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 specified command, but it does not execute the command. periodt. ✨

this function is equivalent to SPI_prepare_cursor, with the extra little bonus that the caller can specify parser hook functions to control the parsing of external parameter references. it's giving "same energy, more control." πŸ’–

🚨 bestie heads up: this function is now deprecated in favor of SPI_prepare_extended. no cap, that's literally what the page says. πŸ’€

πŸŽ€ ARGUMENTS πŸŽ€

  • const char * command β€” the command string. that's the string, bestie. πŸ“
  • ParserSetupHook parserSetup β€” the parser hook setup function. it's the setup-function main character. πŸ‘‘
  • void * parserSetupArg β€” pass-through argument for parserSetup. exactly that, no more, no less. πŸ¦‹
  • int cursorOptions β€” integer bit mask of cursor options; zero produces default behavior. so zero = default vibe. ✨

πŸ’œ RETURN VALUE πŸ’œ

SPI_prepare_params has the same return conventions as SPI_prepare. so if you already know how SPI_prepare does returns, you already know the whole story here. πŸ’…


okay that's the whole page, bestie! sourced from the PostgreSQL 15.19 documentation, dated 2026 β€” slay and stay iconic πŸ’–βœ¨πŸŒˆ

πŸ“¦ where this page comes from