SELECT current_database();
-- Query to get all database in PostgreSQL and their oid (alternative to l)
SELECT oid, datname FROM pg_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