SPI_cursor_open_with_paramlist

SPI_cursor_open_with_paramlist —使用参数设置游标

Synopsis

Portal SPI_cursor_open_with_paramlist(const char *name,
                                      SPIPlanPtr plan,
                                      ParamListInfo params,
                                      bool read_only)

Description

SPI_cursor_open_with_paramlist设置了一个游标(内部为门户),该游标将执行SPI_prepare准备的语句。此函数等效于SPI_cursor_open,只是有关传递给查询的参数值的信息以不同的方式显示。 ParamListInfo表示形式可以方便地传递该格式中已经可用的值。它还支持通过ParamListInfo中指定的钩子函数使用动态参数集。

传入的参数数据将被复制到游标的门户中,因此可以在游标仍然存在时将其释放。

Arguments

Return Value

指向包含光标的门户的指针。注意没有错误返回约定。任何错误将通过elog报告。

上一章 首页 下一章