PostgreSQL: Table or View?
I'm doing some database exploration today and needed to find out if a collection of tables are all tables, or if some of them are views. By querying the information schema via the following: select table_name, table_type from information_schema.tables;
, I learned more about each table and its type:
> select table_name, table_type from information_schema.tables;
table_name | table_type
---------------------------------------+------------
cats | BASE TABLE
dog | BASE TABLE
dogs_and_cats | VIEW
Tweet