pg_views

A system catalogue view listing the available views in the current database

pg_views is system catalogue view listing the available views in the current database.

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

Definition by PostgreSQL version

pg_views (PostgreSQL 13)

             View "pg_catalog.pg_views"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 viewname   | name |           |          |
 viewowner  | name |           |          |
 definition | text |           |          |
    

Documentation: pg_views

pg_views (PostgreSQL 12)

             View "pg_catalog.pg_views"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 viewname   | name |           |          |
 viewowner  | name |           |          |
 definition | text |           |          |
    

Documentation: pg_views

pg_views (PostgreSQL 11)

             View "pg_catalog.pg_views"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 viewname   | name |           |          |
 viewowner  | name |           |          |
 definition | text |           |          |
    

Documentation: pg_views

pg_views (PostgreSQL 10)

             View "pg_catalog.pg_views"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 viewname   | name |           |          |
 viewowner  | name |           |          |
 definition | text |           |          |
    

Documentation: pg_views

pg_views (PostgreSQL 9.6)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 9.5)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 9.4)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 9.3)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 9.2)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 9.1)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 9.0)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
    

Documentation: pg_views

pg_views (PostgreSQL 8.4)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.oid) AS definition
   FROM pg_class c
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE c.relkind = 'v'::"char";
    

Documentation: pg_views

pg_views (PostgreSQL 8.3)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.oid) AS definition
   FROM pg_class c
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE c.relkind = 'v'::"char";
    

Documentation: pg_views

pg_views (PostgreSQL 8.2)

  View "pg_catalog.pg_views"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 viewname   | name |
 viewowner  | name |
 definition | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.oid) AS definition
   FROM pg_class c
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
  WHERE c.relkind = 'v'::"char";
    

Documentation: pg_views

Change history

Categories

DDL, System catalogue

See also

pg_class, CREATE VIEW, pg_tables