On this page
SPI_execute_plan_with_paramlist
SPI_execute_plan_with_paramlist —执行由SPI_prepare准备的语句
Synopsis
int SPI_execute_plan_with_paramlist(SPIPlanPtr plan,
ParamListInfo params,
bool read_only,
long count)
Description
SPI_execute_plan_with_paramlist执行SPI_prepare准备的语句。此函数等效于SPI_execute_plan,只是有关传递给查询的参数值的信息以不同的方式显示。 ParamListInfo表示形式可以方便地传递该格式中已经可用的值。它还支持通过ParamListInfo中指定的钩子函数使用动态参数集。
Arguments
SPIPlanPtr plan- 准备好的语句(由
SPI_prepare返回)
- 准备好的语句(由
ParamListInfo params- 包含参数类型和值的数据结构;如果没有则为 NULL
bool read_onlytrue用于只读执行
long count- 要返回的最大行数,或
0无限制
- 要返回的最大行数,或
Return Value
返回值与SPI_execute_plan相同。
如果成功,则将SPI_processed和SPI_tuptable设置为SPI_execute_plan。