Postgres connect to Database

Use c or connect to connect or switch databases:

connect database_name
$ psql

psql (11.1, server 11.0)

Type "help" for help.

admin=# l

                                  List of databases

   Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges   

-----------+----------+----------+-------------+-------------+-----------------------

admin     | admin    | UTF8     | en_US.UTF-8 | en_US.UTF-8 |

postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |

template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +

           |          |          |             |             | postgres=CTc/postgres

template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +

           |          |          |             |             | postgres=CTc/postgres

(4 rows)

admin=# c postgres

psql (11.1, server 11.0)

You are now connected to database "postgres" as user "admin".