SELECT current_database();
# List databases:
l
SELECT datname FROM pg_database;
# inside psql
l
SELECT datname FROM pg_database;
Code language: SQL (Structured Query Language) (sql)
l
Code language: Shell Session (shell)
postgres=# l+
Code language: psql