我该如何为同一主机/数据库/用户规则设置多种身份验证方法? 我想要能够使用 sudo -u postgres psql -U postgres
(无需输入PostgreSQL密码)和 psql -U postgres --password
来登录到我的postgres用户。 在pg_hba.conf中类似以下的东西:
local all postgres md5
local all postgres peer
我只能同时让其中一种方法工作。
谢谢。
(我正在使用PostgreSQL 9.1)。