我有一个PostgreSQL 9.3数据库,我想连接只有localhost没有密码。如果从任何其他服务器建立连接,那么我希望数据库提示输入密码。我只想从localhost没有密码连接。 pg_hba.conf看起来像:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all password
# IPv4 local connections:
host all all localhost password
# IPv6 local connections:
host all all all password