Re: Keywords in pg_hba.conf should be field-specific

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Keywords in pg_hba.conf should be field-specific
Дата
Msg-id AANLkTi=4nCkLi8p29up2gOuM1nNcotXwr49AopnjObjp@mail.gmail.com
обсуждение исходный текст
Ответ на Keywords in pg_hba.conf should be field-specific  (Brendan Jurd <direvus@gmail.com>)
Ответы Re: Keywords in pg_hba.conf should be field-specific  (Brendan Jurd <direvus@gmail.com>)
Список pgsql-hackers
On Sat, Oct 9, 2010 at 11:13 AM, Brendan Jurd <direvus@gmail.com> wrote:
> I understand that 'replication' is a keyword as far as the database
> name is concerned, but I was surprised to find that it was treated as
> a keyword in the username field also.  I had a look in
> src/backend/libpq/hba.c, and next_token() appears to be completely
> naive about this.  'replication' (along with 'all', 'sameuser',
> 'samegroup' and 'samerole')  is treated as a keyword wherever it
> appears, not just in the field where it is relevant.  next_token()
> appends a newline to the end of the 'replication' username token, and
> that's why the entry doesn't match my connection attempt.
>
> I suspect this is going to trip a lot of people up.  We could just
> document it and tell people that if they want to use 'replication' as
> a username, they'd better quote it in pg_hba.conf.  But I'd prefer to
> actually solve the problem.

Agreed. We should address that.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: KaiGai Kohei
Дата:
Сообщение: Re: security hook on table creation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgxs docdir question