System Catalogs / System catalogs
pg_rewrite
Read the PG 18 manualThe catalog pg_rewrite stores rewrite rules for tables and views.
Reading PG 18current·documented in 24 of 24 versions, 7.4 to 20
- Kind
- System catalogs
- Columns in this snapshot
- 8
- Definition source
- English manual
- Metadata snapshot
- 18.6
Columns 8
As listed in the PostgreSQL 18 manual.
| Column | Type | Description / reference |
|---|---|---|
oid | oidNOT NULL | Row identifier |
rulename | nameNOT NULL | Rule name |
ev_class | oidNOT NULL | The table this rule is for pg_class.oid |
ev_type | charNOT NULL | Event type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4 = DELETE |
ev_enabled | charNOT NULL | Controls in which 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 | boolNOT NULL | True if the rule is an INSTEAD rule |
ev_qual | pg_node_treeNOT NULL | Expression tree (in the form of a nodeToString() representation) for the rule's qualifying condition |
ev_action | pg_node_treeNOT NULL | Query tree (in the form of a nodeToString() representation) for the rule's action |
Column history across versions
Version history 6
Definition snapshot: english-manuals:bdb691c62f5b37d6bd4a7015ee5… · English manual source