Re: why restrict role "public" but not "Public"? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: why restrict role "public" but not "Public"?
Date
Msg-id 7397.1282692470@sss.pgh.pa.us
Whole thread Raw
In response to Re: why restrict role "public" but not "Public"?  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: why restrict role "public" but not "Public"?
Next
From: Tom Lane
Date:
Subject: Re: HS/SR on AIX