pg_hba.conf我的PostgreSQL-12.6 安装中有这些设置
# "local" is for Unix domain socket connections only
local all all md5
local all postgres trust # ident
# IPv4 local connections:
host all all 127.0.0.1/32 trust # md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
Run Code Online (Sandbox Code Playgroud)
我应该local all postgres trust允许我在本地登录,而psql 无需以 UNIX …