]> begriffs open source - ai-pg/blob - full-docs/txt/view-pg-prepared-statements.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / view-pg-prepared-statements.txt
1
2 53.16. pg_prepared_statements #
3
4    The pg_prepared_statements view displays all the prepared statements
5    that are available in the current session. See PREPARE for more
6    information about prepared statements.
7
8    pg_prepared_statements contains one row for each prepared statement.
9    Rows are added to the view when a new prepared statement is created and
10    removed when a prepared statement is released (for example, via the
11    DEALLOCATE command).
12
13    Table 53.16. pg_prepared_statements Columns
14
15    Column Type
16
17    Description
18
19    name text
20
21    The identifier of the prepared statement
22
23    statement text
24
25    The query string submitted by the client to create this prepared
26    statement. For prepared statements created via SQL, this is the PREPARE
27    statement submitted by the client. For prepared statements created via
28    the frontend/backend protocol, this is the text of the prepared
29    statement itself.
30
31    prepare_time timestamptz
32
33    The time at which the prepared statement was created
34
35    parameter_types regtype[]
36
37    The expected parameter types for the prepared statement in the form of
38    an array of regtype. The OID corresponding to an element of this array
39    can be obtained by casting the regtype value to oid.
40
41    result_types regtype[]
42
43    The types of the columns returned by the prepared statement in the form
44    of an array of regtype. The OID corresponding to an element of this
45    array can be obtained by casting the regtype value to oid. If the
46    prepared statement does not provide a result (e.g., a DML statement),
47    then this field will be null.
48
49    from_sql bool
50
51    true if the prepared statement was created via the PREPARE SQL command;
52    false if the statement was prepared via the frontend/backend protocol
53
54    generic_plans int8
55
56    Number of times generic plan was chosen
57
58    custom_plans int8
59
60    Number of times custom plan was chosen
61
62    The pg_prepared_statements view is read-only.