In MySQL I used use database_name;
use database_name;
What's the PostgreSQL equivalent?
\connect DBNAME
You can connect to a different database with \c <database> or \connect <database>:
\c <database>
\connect <database>
At the PSQL prompt, you can do:
\connect (or \c) dbname