From: | Pavel Golub <pavel(at)microolap(dot)com> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | AlterUserStmt anmd RoleSpec rules in grammar.y |
Date: | 2017-07-26 14:13:02 |
Message-ID: | 891404403.20170726171302@gf.microolap.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello, hackers.
I need someone to throw some light on grammar (gram.y).
I'm investigating beta2 regression tests, and found new statement
`ALTER USER ALL SET application_name to 'SLAP';`
^^^
I know for sure that in beta1 this operator fails. So I decided to recheck gram.y:
AlterUserStmt:
ALTER USER RoleSpec SetResetClause;
....
RoleSpec: NonReservedWord
| CURRENT_USER
| SESSION_USER;
But *ALL is reserved word*! Thus "ALTER ROLE\USER ALL" should fail.
OK, I checked in Pg10 beta2, installer provided by EDB. It worked.
Then I asked someone to check this against fresh built server from
'master'. It failed.
So, the situation is:
1. Docs say this is correct statement:
https://www.postgresql.org/docs/devel/static/sql-alterrole.html
2. The sources in master don't support such production:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/gram.y;h=4b1ce09c445a5ee249a965ec0953b122df71eb6f;hb=refs/heads/master
Line 1179 for AlterUserSetStmt rule;
Line 14515 for RoleSpec rule;
3. EDB 10beta2 server supports it.
What's going on?
--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2017-07-26 14:24:15 | Re: [PATCH v3] pg_progress() SQL function to monitor progression of long running SQL queries/utilities |
Previous Message | Jordan Gigov | 2017-07-26 14:11:11 | Re: Change in "policy" on dump ordering? |