How to fetch a list of schema from the current database. The result which we get using \dn. This query fetches all schema
SELECT table_schema,table_name
FROM information_schema.tables
ORDER BY table_schema,table_name;
But I want only the schema which is defined in the current database. And then how to fetch all tables corresponding to that particular schema?
where table_schema not in (...)
to your query – Seedbedwhere table_schema not in ('pg_catalog', 'pg_temp_1', 'information_schema', 'public', 'pg_internal');
– Seedbed