↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

System Catalogs / System catalogs

The 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.

ColumnTypeDescription / reference
oidoidNOT NULLRow identifier
rulenamenameNOT NULLRule name
ev_classoidNOT NULLThe table this rule is for
pg_class.oid
ev_typecharNOT NULLEvent type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4 = DELETE
ev_enabledcharNOT NULLControls 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_insteadboolNOT NULLTrue if the rule is an INSTEAD rule
ev_qualpg_node_treeNOT NULLExpression tree (in the form of a nodeToString() representation) for the rule's qualifying condition
ev_actionpg_node_treeNOT NULLQuery tree (in the form of a nodeToString() representation) for the rule's action
Column history across versions
Version history 6
  1. 11 → 12 changed
  2. 9.6 → 10 reworded
  3. 9.3 → 9.4 changed
  4. 9.0 → 9.1 changed
  5. 8.3 → 8.4 reworded
  6. 8.2 → 8.3 changed

Definition snapshot: english-manuals:bdb691c62f5b37d6bd4a7015ee5… · English manual source