DBNAME

The name of the database to which you are currently connected.

The name of the database to which you are currently connected. DBNAME is set every time you connect to a database (including program startup), but it can be unset.