如何爲同一主機/數據庫/用戶規則設置多種身份驗證方法?我希望能夠使用sudo -u postgres psql -U postgres
(無需輸入PostgreSQL密碼)和psql -U postgres --password
登錄到我的postgres用戶。在pg_hba.conf中有如下內容:PostgreSQL多重身份驗證方法
local all postgres md5
local all postgres peer
我只能得到一種方法或其他同時工作。
謝謝。
(我正在使用PostgreSQL 9.1)。
參見http://www.postgresql.org/docs/9.5/static/libpq-pgpass。 html的細節 – 2016-05-04 08:24:44