pg_cursors
pg_cursors#
The pg_cursors
view lists the cursors that are currently available. Cursors can be defined in several ways:
via the DECLARE statement in SQL
via the Bind message in the frontend/backend protocol
via the Server Programming Interface (SPI)
The pg_cursors
view displays cursors created by any of these means. Cursors only exist for the duration of the transaction that defines them, unless they have been declared WITH HOLD
. Therefore non-holdable cursors are only present in the view until the end of their creating transaction.
Table 1. pg_catalog.pg_cursors
Name |
Type |
Description |
|
---|---|---|---|
|
|
The name of the cursor |
|
|
|
The verbatim query string submitted to declare this cursor |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The time at which the cursor was declared |
|
|
|
true if the cursor was declared PARALLEL RETRIEVE; false otherwise. |
The pg_cursors
view is read only.