[postgres@rhel73 ~]$ psql -d test -------->>>使用psql连接进入test数据库
psql (9.6.0)
Type "help" for help.

test=# \c                         -------->>>查看当前psql是用哪个user连接的哪个数据库
You are now connected to database "test" as user "postgres".
test=# \q                         -------->>>退出psql
[postgres@rhel73 ~]$ psql -d testa
psql: FATAL:  database "testa" does not exist
[postgres@rhel73 ~]$