So I'm new to Postgres and I want to have a look at how postgres stores schema data since I am building a database manager like pgAdmin as a hobby project. My understanding is that all the schema data like names of tables and columns, column types, etc is stored in the `information_schema` table, however I cannot find the `information_schema` table anywhere in pgAdmin.
Edit: sorry I meant tables named eg `information_schema.tables`, not a table named `information_schema`
Edit 2: Having read more about Postgres, I think "metadata" is a more accurate word for what I was looking for than "schema" which is the language used by SQLite which I was using previously.
From the documentation:
select table_name from INFORMATION_SCHEMA.views;
If you don't want the system views is your result, try this:
select table_name from INFORMATION_SCHEMA.views WHERE table_schema = ANY (current_schemas(false))
You can query pg_catalog.pg_views for your desired information:
select viewname from pg_catalog.pg_views;
Refined query to get schema name also - just in case you have multiple views with the same name in different schemas - and left out those system views:
select schemaname, viewname from pg_catalog.pg_views
where schemaname NOT IN ('pg_catalog', 'information_schema')
order by schemaname, viewname;
IMHO, this way is better than query INFORMATION_SCHEMA.views for reasons stated in my comment to Phil's answer.