连接数据库(超级管理员 postgres)
psql -U postgres
查看当前登录用户 / 数据库
postgres=# \c
You are now connected to database "postgres" as user "postgres".
mydb=# select current_database();
current_database
------------------
mydb
(1 行)
postgres=# select user;
postgres=# select current_user;
current_user
--------------
postgres
(1 行记录)
连接数据库(超级管理员 postgres)
psql -U postgres
查看当前登录用户 /