选择 current_database() 作为数据库并将用户作为用户返回; 展示端口; 如果您正在使用 psql(1),则可以在 Linux 和 OSX 上分别像这样发现您的主机名: \echo hostname \echo scutil --get ComputerName