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.

Kind
System catalogs
Columns in this snapshot
8
Definition source
English manual

Columns 8

ColumnTypeDescription / reference
oidoidRow identifier
rulenamenameRule name
ev_classoidThe table this rule is for
pg_class.oid
ev_typecharEvent type that the rule is for: 1 = SELECT, 2 = UPDATE, 3 = INSERT, 4 = DELETE
ev_enabledcharControls 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_insteadboolTrue if the rule is an INSTEAD rule
ev_qualpg_node_treeExpression tree (in the form of a nodeToString() representation) for the rule's qualifying condition
ev_actionpg_node_treeQuery tree (in the form of a nodeToString() representation) for the rule's action
Column history across versions
Version history 5
  1. PG 11 → 12changed
  2. PG 9.6 → 10changed
  3. PG 9.3 → 9.4changed
  4. PG 9.2 → 9.3changed
  5. PG 9.0 → 9.1changed

Definition snapshot: english-manuals:88d6b72cdabe41b4f98925254bb… · English manual source