Re: why restrict role "public" but not "Public"?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: why restrict role "public" but not "Public"?
Дата
Msg-id 7397.1282692470@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: why restrict role "public" but not "Public"?  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> The reason I'm asking is that I'm trying to allow "public" to be passed
> to has_table_privileges(), and have it check for the PUBLIC pseudo-role.
> Originally I had coded it using pg_strcasecmp() on the grounds that any
> case should refer to this.

That would be incorrect, IMO.  Ordinary role names passed to that
function would certainly not be treated case-insensitively, so this
one should not be either.

> It seems a complicated rule to document.  Seems better to just disallow
> creating a role "public" regardless of case.

Perhaps, but the above is not a good argument for changing it.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: why restrict role "public" but not "Public"?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: HS/SR on AIX