1WITH "names"("name") AS (
2 SELECT n.nspname AS "name"
3 FROM pg_catalog.pg_namespace n
4 WHERE n.nspname !~ '^pg_'
5 AND n.nspname <> 'information_schema'
6) SELECT "name",
7 pg_catalog.has_schema_privilege(current_user, "name", 'CREATE') AS "create",
8 pg_catalog.has_schema_privilege(current_user, "name", 'USAGE') AS "usage"
9 FROM "names";
10