选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

受支持版本: 当前版本 (18) / 17 / 16 / 15 / 14
测试与开发版本: 19 / devel
不受支持的版本: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0
历史版本PostgreSQL 9.2 已于 2017 年 11 月结束社区维护,本页译文保留供仍在使用旧版本的读者参考。新系统请看当前版本

45.55. pg_cursors #

pg_cursors视图列出当前可用的游标。游标可以通过几种方式定义:

pg_cursors视图会显示通过上述任意方式创建的游标。游标仅在定义它的事务持续期间存在,除非将其声明为WITH HOLD。因此,不可保持的游标只会在此视图中保留到创建它的事务结束为止。

注意

游标在内部用于实现PostgreSQL的某些组件,如过程语言。因此,pg_cursors视图可能包含用户未明确创建的游标。

表 45.56. pg_cursors

Name Type Description
name text The name of the cursor
statement text The verbatim query string submitted to declare this cursor
is_holdable boolean true if the cursor is holdable (that is, it can be accessed after the transaction that declared the cursor has committed); false otherwise
is_binary boolean true if the cursor was declared BINARY; false otherwise
is_scrollable boolean true if the cursor is scrollable (that is, it allows rows to be retrieved in a nonsequential manner); false otherwise
creation_time timestamptz The time at which the cursor was declared

pg_cursors视图是只读的。

提交更正

译文有误、术语不当或页面显示问题,请到译文仓库 pgsty/pgdoc 报告译文问题。 英文原文本身的问题,请在当前版本的对应页面向上游反馈;上游不再修订已结束维护的版本。