From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com> |
Cc: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Stephen Frost <sfrost(at)snowman(dot)net>, "Marti R(dot)" <marti(at)juffo(dot)org>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: alter user/role CURRENT_USER |
Date: | 2014-10-30 21:11:36 |
Message-ID: | 10106.1414703496@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-10-30 21:23:11 | Re: TAP test breakage on MacOS X |
Previous Message | Tom Lane | 2014-10-30 20:59:45 | Re: alter user/role CURRENT_USER |