Re: alter user/role CURRENT_USER

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: alter user/role CURRENT_USER
Дата
Msg-id 10106.1414703496@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: alter user/role CURRENT_USER  (Adam Brightwell <adam.brightwell@crunchydatasolutions.com>)
Ответы Re: alter user/role CURRENT_USER
Список pgsql-hackers
Adam Brightwell <adam.brightwell@crunchydatasolutions.com> writes:
> FWIW, I found the following in the archives:

> http://www.postgresql.org/message-id/15516.1038718413@sss.pgh.pa.us

> Now this is from 2002 and it appears it wasn't necessary to change at the
> time, but I haven't yet found anything else related (it's a big archive).
> Though, as I understand it, PUBLIC is now non-reserved as of SQL:2011 which
> might make a compelling argument to leave it as is?

The current spec does list PUBLIC as a non-reserved keyword, but it also
says (5.4 "Names and identifiers" syntax rules)
    20) No <authorization identifier> shall specify "PUBLIC".

which, oddly enough, seems to license us to handle "PUBLIC" the way
we are doing.  OTOH, it lists CURRENT_USER as a reserved word, suggesting
that they don't think the same type of hack should be used for that.

I'd be inclined to leave the grammar as such alone (ie CURRENT_USER is
a keyword, PUBLIC isn't).  Changing that has more downside than upside,
and we do have justification in the spec for treating the two cases
differently.  However, I agree that we should fix the subsequent
processing so that "current_user" is not confused with CURRENT_USER.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: alter user/role CURRENT_USER
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TAP test breakage on MacOS X