Align GRANT/REVOKE behavior more closely with the SQL spec, per discussion
Tom Lane <tgl@sss.pgh.pa.us>
Align GRANT/REVOKE behavior more closely with the SQL spec, per discussion of bug report #1150. Also, arrange that the object owner's irrevocable grant-option permissions are handled implicitly by the system rather than being listed in the ACL as self-granted rights (which was wrong anyway). I did not take the further step of showing these permissions in an explicit 'granted by _SYSTEM' ACL entry, as that seemed more likely to bollix up existing clients than to do anything really useful. It's still a possible future direction, though.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/grant.sgml | modified | +46 −18 |
| doc/src/sgml/ref/revoke.sgml | modified | +26 −5 |
| src/backend/catalog/aclchk.c | modified | +347 −215 |
| src/backend/utils/adt/acl.c | modified | +324 −87 |
| src/include/utils/acl.h | modified | +15 −5 |
| src/include/utils/errcodes.h | modified | +3 −1 |
| src/test/regress/expected/privileges.out | modified | +3 −3 |