]> begriffs open source - ai-pg/blob - full-docs/txt/catalog-pg-rewrite.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / catalog-pg-rewrite.txt
1
2 52.45. pg_rewrite #
3
4    The catalog pg_rewrite stores rewrite rules for tables and views.
5
6    Table 52.45. pg_rewrite Columns
7
8    Column Type
9
10    Description
11
12    oid oid
13
14    Row identifier
15
16    rulename name
17
18    Rule name
19
20    ev_class oid (references pg_class.oid)
21
22    The table this rule is for
23
24    ev_type char
25
26    Event type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4
27    = DELETE
28
29    ev_enabled char
30
31    Controls in which session_replication_role modes the rule fires. O =
32    rule fires in “origin” and “local” modes, D = rule is disabled, R =
33    rule fires in “replica” mode, A = rule fires always.
34
35    is_instead bool
36
37    True if the rule is an INSTEAD rule
38
39    ev_qual pg_node_tree
40
41    Expression tree (in the form of a nodeToString() representation) for
42    the rule's qualifying condition
43
44    ev_action pg_node_tree
45
46    Query tree (in the form of a nodeToString() representation) for the
47    rule's action
48
49 Note
50
51    pg_class.relhasrules must be true if a table has any rules in this
52    catalog.