PostgreSQL List Databases: \l, SQL and GUI

Run \l in psql, or psql -l from a shell, to list every database on the server.

In SQL, SELECT datname FROM pg_database WHERE NOT datistemplate; returns your databases without the templates.

A missing database usually means the wrong server, a missing CONNECT privilege, or datallowconn set to false.

\l+ shows No Access for the size when your role cannot connect to that database.

Databases are not schemas: use \dn for schemas and \dt for tables.

Read the full post

Read the full post