- Published on
How to list all custom schemas in Postgres SQL
- Authors
- Name
- Ashik Nesin
- @AshikNesin
Sometimes we might need to list down all the custom schema (excluding the ones that are created by default by Postgres itself)
For such cases, we can run the following SQL query to achieve it.
SELECT schema_name
FROM information_schema.schemata
WHERE schema_name NOT LIKE 'pg_%'
AND schema_name != 'information_schema';
Happy listing schemas!