SPI_PREPARE_PARAMS(3)
β¨ 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 forparserSetup. 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
- opensuse-leap 16.0: postgresql15-docs 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms