how to select and donnect to database in psql console code example Example: use database postgres command \c databasename;