PostgreSQL – Get current database name

Run the below command to check the current database you are connected to in Postgres.

SELECT current_database();

See also  PostgreSQL - Change Schema Owner