SPI_PREPARE_PARAMS(3)
π
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 stringParserSetupHook parserSetupβ parser hook setup functionvoid * parserSetupArgβ pass-through argument forparserSetupint 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
- opensuse-leap 16.0: postgresql16-docs 16.15-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