RefLib

Reference library for AI

Back

postgresql_16:8.2.45 pg_rewrite

PostgreSQL 16 > Internals > System Catalogs > pg_rewrite

The catalog pg_rewrite stores rewrite rules for tables and views.

| Column Type Description | | --- | | oid oid Row identifier | | rulename name Rule name | | ev_class oid (references pg_class (see postgresql_16:8.2.11).oid) The table this rule is for | | ev_type char Event type that the rule is for: 1 = (see postgresql_16:7.1.170), 2 = (see postgresql_16:7.1.181), 3 = (see postgresql_16:7.1.150), 4 = (see postgresql_16:7.1.98) | | ev_enabled char Controls in which (see guc-session-replication-role) modes the rule fires. O = rule fires in “origin” and “local” modes, D = rule is disabled, R = rule fires in “replica” mode, A = rule fires always. | | is_instead bool True if the rule is an INSTEAD rule | | ev_qual pg_node_tree Expression tree (in the form of a nodeToString() representation) for the rule's qualifying condition | | ev_action pg_node_tree Query tree (in the form of a nodeToString() representation) for the rule's action |

Note

pg_class.relhasrules must be true if a table has any rules in this catalog.

Back