When I add a new PostGIS database connection to QGIS the dialog asks for the database name.
At times I want to add a database and can't remember the exact name or I want to add a database from a different server and I'm not sure what databases are available.
Is there a way to list all databases on a server within QGIS? I know I could look this information up in pgAdmin but I'd prefer to keep it within QGIS.
SELECT datname FROM pg_database WHERE datistemplate = false;. It will list all the databases on the server. But I guess your question is more about being able to see the databases in the Add Layers window.