pg_rewrite
pg_rewrite#
The pg_rewrite system catalog table stores rewrite rules for tables and views. pg_class_internal.relhasrules must be true if a table has any rules in this catalog.
Table 1. pg_catalog.pg_rewrite
column |
type |
references |
description |
|---|---|---|---|
|
name |
Rule name. |
|
|
oid |
pg_class_internal.oid |
The table this rule is for. |
|
smallint |
The column this rule is for (currently, always zero to indicate the whole table). |
|
|
char |
Event type that the rule is for:1 = |
|
|
boolean |
True if the rule is an |
|
|
text |
Expression tree (in the form of a |
|
|
text |
Query tree (in the form of a |