SPI_execute_plan_with_paramlist — 执行由 SPI_prepare 准备的语句
int SPI_execute_plan_with_paramlist(SPIPlanPtrplan, ParamListInfoparams, boolread_only, longcount)
SPI_execute_plan_with_paramlist 执行由 SPI_prepare 准备的语句。此函数等同于 SPI_execute_plan,只是传递给查询的参数值信息以不同的方式呈现。ParamListInfo 格式在传递已以该格式准备好的值时可能很方便。它还支持通过 ParamListInfo 中指定的钩子函数使用动态参数集。
此函数现已弃用,推荐使用 SPI_execute_plan_extended。
SPIPlanPtr plan已准备好的语句(由 SPI_prepare 返回)
ParamListInfo params包含参数类型和值的结构体;如果没有参数则为 NULL
bool read_only只读执行时为 true
long count要返回的最大行数,或 0 表示无限制
返回值与 SPI_execute_plan 相同。
如果成功,SPI_processed 和 SPI_tuptable 的设置与 SPI_execute_plan 相同。