Tag Archives: information_schema

query to find whether an object is table or view in postgresql

Postgresql has a default schema named information_schema, which consists of a set of views, that contain information about the objects defined in the current database.


select * from information_schema.tables where table_name like ‘%<object name>%’;

tables: This view contains all tables and views defined in the current database.