Catalog changes: * Remove pg_shadow/pg_group * Add pg_authid and pg_auth_members * Add indexes for pg_authid/pg_auth_members * Add array_accum function for backwards compatible pg_group * Add views for pg_shadow/pg_group ACL system changes: * Change AclId to Oid * Change all 'owner' types to Oid * Need to implement per-backend role-member cacheing * Need to do multi-level role resolution when filling the cache * Implement use of the per-backend role-member cache in ACLs * Add hooks to update per-backend role-member cache on pg_auth_members changes * Change ownership checks to consider members of a role as owners for anything that role owns * Allow ownership change to role which role is a member of * Support 'grant to ' * Support 'with admin option' * Support 'granted by' Fix grant role/revoke role grammar to match SQL spec (remove 'ROLE' and fix reduce/reduce conflicts) Fix grant role/revoke role grammar wrt 'admin option' (currently gives syntax error when 'with admin option' is used) Verify 'with admin option' working correctly Check/prevent role circles/loops On-Disk file format changes * Merge pg_authid and pg_auth_members into one file * Perform full role expansion in backend during file generation * Sort roles before writing pg_auth file * Support log replay (do not use indexes, etc) * Remove sorting from client startup Parser/commands changes * Add CREATE ROLE mechanism * Change C functions to role-based * Fix CREATE ROLE to support all CREATE USER/CREATE GROUP options * Adjust CREATE USER/CREATE GROUP to use role-based C functions * ALTER ROLE changes (mimicing CREATE ROLE, etc) * RENAME ROLE * DROP ROLE * Warn that SYSID is no longer a valid option and to not depend on it * Add on additional options to create role which are now available * Implement better DROP ROLE mechanism (instead of seq scan pg_auth_members) * Adjust CREATE USER/CREATE GROUP to imply canlogin/nologin respectfully * Fix other parsers (ecpg, etc) based on updates to backend/parser. ? Distinguish 'create role' permissions from 'superuser'? psql changes Modify \du, \dg to use new tables Add \dr, \dm ? Depreciate \du, \dg Documentation Add documentation for CREATE ROLE/etc ? Depreciate CREATE USER/CREATE GROUP Document new system catalogs (pg_authid, pg_auth_members) Regression tests Verify regression tests still pass