postgres change database code example
Example 1: change database postgres
psql: \connect DBNAME. or in short: \c DBNAME.
Example 2: how to switch database in psql
user_name=# CREATE DATABASE testdatabase;
user_name=# \c testdatabase
psql: \connect DBNAME. or in short: \c DBNAME.
user_name=# CREATE DATABASE testdatabase;
user_name=# \c testdatabase