You can do the same with the PostgreSQL function CURRENT_DATABASE() :
Code:
postgres=# select current_database() ;
current_database
------------------
postgres
(1 row)
postgres=#
Oh, and... well, the title is not really good, isn't it ?
That's not the default database, but the current database, right ?