List views in PostgreSQL database

Query below lists all views in PostgreSQL database

Query

select table_schema as schema_name,
       table_name as view_name
from information_schema.views
where table_schema not in ('information_schema', 'pg_catalog')
order by schema_name,
         view_name;

Columns

  • schema_name - schema name
  • view_name - view name

Rows

  • One row represents one view in a database
  • Scope of rows: all views in PostgreSQL database
  • Ordered by table schema, view name

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.