Redrock Postgres 搜索 英文
版本: 9.3 / 9.4 / 9.5 / 9.6 / 10 / 11 / 12 / 13 / 14 / 15 / 16 / 17

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)

描述

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_execute_plan 一样设置 SPI_processedSPI_tuptable