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

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 / 8.4 / 8.3 / 8.2
历史版本。 PostgreSQL 9.2 已结束支持。 2017-11-09. 请参阅 当前版本手册.

45.55. pg_cursors #

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

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

注意

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

表 45.56. pg_cursors 列

NameTypeDescription
nametextThe name of the cursor
statementtextThe verbatim query string submitted to declare this cursor
is_holdableboolean true if the cursor is holdable (that is, it can be accessed after the transaction that declared the cursor has committed); false otherwise
is_binaryboolean true if the cursor was declared BINARY; false otherwise
is_scrollableboolean true if the cursor is scrollable (that is, it allows rows to be retrieved in a nonsequential manner); false otherwise
creation_timetimestamptzThe time at which the cursor was declared

pg_cursors视图是只读的。

报告文档问题

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