string pg_dbname ([ resource $connection ] )
pg_dbname() returns the name of the database that the given PostgreSQL connection resource.
A string containing the name of the database the connection is to, or FALSE on error.