pg_rules

A system catalogue view listing the available query rewrite rules

pg_rules is a system catalogue view listing the available query rewrite rules.

pg_rules was added in PostgreSQL 6.4 (initial commit 15cb32d9).

Definition by PostgreSQL version

pg_rules (PostgreSQL 13)

             View "pg_catalog.pg_rules"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 rulename   | name |           |          |
 definition | text |           |          |
    

Documentation: pg_rules

pg_rules (PostgreSQL 12)

             View "pg_catalog.pg_rules"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 rulename   | name |           |          |
 definition | text |           |          |
    

Documentation: pg_rules

pg_rules (PostgreSQL 11)

             View "pg_catalog.pg_rules"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 rulename   | name |           |          |
 definition | text |           |          |
    

Documentation: pg_rules

pg_rules (PostgreSQL 10)

             View "pg_catalog.pg_rules"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 rulename   | name |           |          |
 definition | text |           |          |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.6)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.5)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.4)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.3)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.2)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.1)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 9.0)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
    

Documentation: pg_rules

pg_rules (PostgreSQL 8.4)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS tablename, r.rulename, pg_get_ruledef(r.oid) AS definition
   FROM pg_rewrite r
   JOIN pg_class c ON c.oid = r.ev_class
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE r.rulename <> '_RETURN'::name;
    

Documentation: pg_rules

pg_rules (PostgreSQL 8.3)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS tablename, r.rulename, pg_get_ruledef(r.oid) AS definition
   FROM pg_rewrite r
   JOIN pg_class c ON c.oid = r.ev_class
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE r.rulename <> '_RETURN'::name;
    

Documentation: pg_rules

pg_rules (PostgreSQL 8.2)

  View "pg_catalog.pg_rules"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 rulename   | name |
 definition | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS tablename, r.rulename, pg_get_ruledef(r.oid) AS definition
   FROM pg_rewrite r
   JOIN pg_class c ON c.oid = r.ev_class
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE r.rulename <> '_RETURN'::name;
    

Documentation: pg_rules

Change history

Categories

DDL, System catalogue