find name of database in psql code example Example: postgresql show current database SELECT current_database();