| select datname from pg_database;
Others to try:
|using pgAdmin III
Note: In pgAdmin III, you must select a Database to enable SQL Tool:
I have two Users/Owners, default is postgres.
|In the query below I used postgres, default user's SQL worksheet.
Both the users are allowed to access all the databases in PostgreSQL