Using \c <database_name>
in PostgreSQL will connect to the named database.
How can the name of the current database be determined?
Entering:
my_db> current_database();
produces:
ERROR: syntax error at or near "current_database"
LINE 1: current_database();