Re: pg_ident.conf + regular expressions issue

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: pg_ident.conf + regular expressions issue
Дата
Msg-id CAKFQuwax1My2dkS+khckf2qA524NoQhF-kqUZq=EJ6=LEDnZxQ@mail.gmail.com
обсуждение исходный текст
Ответ на pg_ident.conf + regular expressions issue  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
On Mon, Oct 21, 2024 at 4:33 AM Alexey Shishkin <alexey.shishkin.01@gmail.com> wrote:
I'm not 100% sure it's a bug, but at least it doesn't work as expected.


You seem to be expecting regular expressions to be able to turn what is a case-sensitive login matching process into a case-insensitive one.  A regular expression cannot do that - well, not one that uses \1.

The value of \1 is going to be in whatever case the OS user name is.  So if you try and login with a case that doesn't match the case of the role supplied with -U the login attempt will fail.  If they do match, it will succeed.  You have to get rid of the \1 and hardcode "smokeybear" as the PG user name if you want any random capitalization of smokeybear to be able to login using that role name (not tested...).

David J.

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