20

I want to list out all the existing databases within a Redshift cluster. How can I do that.

What SQL query can I fire such that it sends me a list of all the databases within the AWS cluster

Arafat Nalkhande
  • 11,078
  • 9
  • 39
  • 63

1 Answers1

33

Please try this.

    SELECT * FROM pg_database;
avertocle
  • 541
  • 4
  • 6
  • `SELECT * FROM PG_DATABASE_INFO` also works https://docs.aws.amazon.com/redshift/latest/dg/r_PG_DATABASE_INFO.html – prayagupa Dec 23 '22 at 22:07