How to list all the databases in a Redshift cluster

Run the below query to list all the databases in a Redshift cluster.

select oid as db_id, datname as db_name, datallowconn from pg_database;

See also  How to view all the policies attached to an IAM group