How do I get postgres list schemas?

373    Asked by bruce_8968 in SQL Server , Asked on Sep 29, 2022

When using PostgreSQL v9.1, how do I list all of the schemas using SQL?

I was expecting something along the lines of:

SELECT something FROM pg_blah;

Answered by Buffy Heaton

For postgres list schemas, use the (ANSI) standard INFORMATION_SCHEMA

select schema_name

from information_schema.schemata;

More details in the manual


select nspname

from pg_catalog.pg_namespace;

More details about pg_catalog in the manual

Your Answer


Parent Categories