postgresql how to change current database code example Example: change database postgres psql: \connect DBNAME. or in short: \c DBNAME.