]> begriffs open source - ai-pg/blob - full-docs/txt/view-pg-cursors.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / view-pg-cursors.txt
1
2 53.7. pg_cursors #
3
4    The pg_cursors view lists the cursors that are currently available.
5    Cursors can be defined in several ways:
6      * via the DECLARE statement in SQL
7      * via the Bind message in the frontend/backend protocol, as described
8        in Section 54.2.3
9      * via the Server Programming Interface (SPI), as described in
10        Section 45.1
11
12    The pg_cursors view displays cursors created by any of these means.
13    Cursors only exist for the duration of the transaction that defines
14    them, unless they have been declared WITH HOLD. Therefore non-holdable
15    cursors are only present in the view until the end of their creating
16    transaction.
17
18 Note
19
20    Cursors are used internally to implement some of the components of
21    PostgreSQL, such as procedural languages. Therefore, the pg_cursors
22    view might include cursors that have not been explicitly created by the
23    user.
24
25    Table 53.7. pg_cursors Columns
26
27    Column Type
28
29    Description
30
31    name text
32
33    The name of the cursor
34
35    statement text
36
37    The verbatim query string submitted to declare this cursor
38
39    is_holdable bool
40
41    true if the cursor is holdable (that is, it can be accessed after the
42    transaction that declared the cursor has committed); false otherwise
43
44    is_binary bool
45
46    true if the cursor was declared BINARY; false otherwise
47
48    is_scrollable bool
49
50    true if the cursor is scrollable (that is, it allows rows to be
51    retrieved in a nonsequential manner); false otherwise
52
53    creation_time timestamptz
54
55    The time at which the cursor was declared
56
57    The pg_cursors view is read-only.