\c name_of_db
or \connect name_of_db
Related
See also
- PostgreSQL:
psql
, .psqlrc, .pgpass
, $HOME/.pg service.conf
, -U, -W, -d
, meta-commands: \du, \dg, \ddp, \dp, \list, \dn, \dt, \c, \l, \di, \q
, show users
, show
, su - postgres
, psql -c, \?, \connect, \conninfo
, --version, --help
, PL/pgSQL