SPI_execute_plan_with_paramlist
SPI_execute_plan_with_paramlist — 执行由SPI_prepare准备的语句
概要
int SPI_execute_plan_with_paramlist(SPIPlanPtr plan,
ParamListInfo params,
bool read_only,
long count)说明
SPI_execute_plan_with_paramlist执行由SPI_prepare准备的语句。此函数等同于SPI_execute_plan,不同之处在于以不同的方式提供要传递给查询的参数值的信息。对于以该格式已有的值,ParamListInfo表示形式非常方便。它还支持通过ParamListInfo中指定挂钩函数来使用动态参数集。
此函数现已弃用,建议使用SPI_execute_plan_extended。
参数
SPIPlanPtrplan已准备的语句(由
SPI_prepare返回)ParamListInfoparams包含参数类型和值的数据结构;如果无,则为 NULL
boolread_only对于只读执行为
truelongcount要返回的最大行数,或对于无限制为
0
返回值
返回值与SPI_execute_plan相同。
如果成功,则SPI_processed和SPI_tuptable会像在SPI_execute_plan中一样设置。
