how to find out your postgres db name command code example Example: postgresql show current database SELECT current_database();