Bring syntax of role-related commands into SQL compliance. To avoid
Tom Lane <tgl@sss.pgh.pa.us>
Bring syntax of role-related commands into SQL compliance. To avoid syntactic conflicts, both privilege and role GRANT/REVOKE commands have to use the same production for scanning the list of tokens that might eventually turn out to be privileges or role names. So, change the existing GRANT/REVOKE code to expect a list of strings not pre-reduced AclMode values. Fix a couple other minor issues while at it, such as InitializeAcl function name conflicting with a Windows system function.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/aclchk.c | modified | +53 −13 |
| src/backend/catalog/pg_proc.c | modified | +2 −2 |
| src/backend/commands/user.c | modified | +49 −47 |
| src/backend/parser/gram.y | modified | +219 −239 |
| src/backend/parser/keywords.c | modified | +8 −2 |
| src/backend/utils/adt/acl.c | modified | +2 −2 |
| src/backend/utils/init/postinit.c | modified | +2 −2 |
| src/include/nodes/parsenodes.h | modified | +4 −4 |
| src/include/storage/pmsignal.h | modified | +2 −2 |
| src/include/utils/acl.h | modified | +2 −2 |
| src/test/regress/expected/rules.out | modified | +1 −1 |