How to switch databases in psql?

In MySQL, I used use database_name;

What's the psql equivalent?


In PostgreSQL, you can use the \connect meta-command of the client tool psql:

\connect DBNAME

or in short:

\c DBNAME

You can connect to a database with \c <database> or \connect <database>.