Re: Test mail for pgsql-general

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Test mail for pgsql-general
Дата
Msg-id CAKFQuwbpdwCxDgY5cjDh-8uneNA010BLfd8TEGF5BJOksxRtbg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Test mail for pgsql-general  (Chris Miller <cjm@tryx.org>)
Ответы Re: Test mail for pgsql-general
Список pgsql-general
On Tuesday, September 10, 2024, Chris Miller <cjm@tryx.org> wrote:
Hi Folks,

I am confused about authentication. I understand that in the local connection case, I have choices of “peer”, and “md5” (password).


In pg_hba.conf, I have the lines:


local all all peer

local all all md5


The second line is pointless, the first three columns are compared against the incoming connection host/user/dbname to find out how authentication should be handled.  The first match wins.  So for every local connection peer, and only peer, is going to be used since everything matches all/all.

There is no way to give a user a choice of how to authenticate.  There will be one accepted option for a given set of connection values.

David J.
 

В списке pgsql-general по дате отправления: