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

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

参数

SPIPlanPtr plan

已准备好的语句(由 SPI_prepare 返回)

ParamListInfo params

包含参数类型和值的结构体;如果没有参数则为 NULL

bool read_only

只读执行时为 true

long count

要返回的最大行数,或 0 表示无限制

返回值

返回值与 SPI_execute_plan 相同。

如果成功,SPI_processedSPI_tuptable 的设置与 SPI_execute_plan 相同。