How do I list all schemas in PostgreSQL?
To lists all schemas, use the (ANSI) standard INFORMATION_SCHEMA

select schema_name
from information_schema.schemata;


More details in the manual

alternatively:

select nspname
from pg_catalog.pg_namespace;


More details about pg_catalog in the manual