how to get database name postgres code example Example: postgresql show current database SELECT current_database();