Switch database connections in the psql console
You can connect to a different database in the psql
console using the \connect
command (or \c
for short)
$ psql
psql (10.5)
Type "help" for help.
postgres=# \c example
You are now connected to database "example" as user "root".
example=#
Tweet