↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

支持中的版本: 当前版本 (18) / 17 / 16 / 15 / 14
开发中的版本: 19 / 20devel
已结束支持的版本: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0
历史版本。 PostgreSQL 12 已结束支持。 2024-11-21. 请参阅 当前版本手册.

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 中指定的钩子函数使用动态参数集。

参数

SPIPlanPtr plan

预备语句(由 SPI_prepare 返回)

ParamListInfo params

包含参数类型和值的数据结构;没有参数时为 NULL

bool read_only

true 表示只读执行

long count

要返回的最大行数,或者用 0 表示不限制

返回值

返回值与 SPI_execute_plan 相同。

成功时,SPI_processed 和 SPI_tuptable 的设置方式与 SPI_execute_plan 相同。

报告文档问题

阅读 上游文档. 反馈更正前请先核对 当前版本手册.