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_only
true
用于只读执行
long count
- 要返回的最大行数,或
0
无限制
- 要返回的最大行数,或
Return Value
返回值与SPI_execute_plan
相同。
如果成功,则将SPI_processed
和SPI_tuptable
设置为SPI_execute_plan
。