Switch database on PGSQL
To switch to another database when connect to PostgreSQL Server use following command on psql.
postgres=>\connect databasename
postgres=> \c databasename
For eg: Lets say you are connected to default postgres database and want to connect to database name mydatabase, try below syntaxpostgres=> \c mydatabase or postgres=> \connect mydatabase
mydatabase=>
Comments