pg_cursors view lists the cursors that are currently available. Cursors can be defined in several ways:
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.
Cursors are used internally to implement some of the components of PostgreSQL, such as procedural languages. Therefore, the
pg_cursors view might include cursors that have not been explicitly created by the user.
|The name of the cursor|
|The verbatim query string submitted to declare this cursor|
|The time at which the cursor was declared|
pg_cursors view is read only.