ALTER DEFAULT PRIVILEGES FOR USER my_user GRANT SELECT ON TABLES TO my_group;
ALTER DEFAULT PRIVILEGES FOR USER my_user IN SCHEMA my_schema GRANT INSERT ON TABLES TO my_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user GRANT UPDATE ON TABLES TO my_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user IN SCHEMA my_schema, your_schema GRANT DELETE ON TABLES TO my_group WITH GRANT OPTION;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user, your_user GRANT TRUNCATE ON TABLES TO GROUP my_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user GRANT REFERENCES, TRIGGER ON TABLES TO PUBLIC;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user GRANT ALL ON SEQUENCES TO GROUP my_group, GROUP your_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user GRANT EXECUTE ON ROUTINES TO my_group;
ALTER DEFAULT PRIVILEGES GRANT ALL PRIVILEGES ON FUNCTIONS TO my_group;
ALTER DEFAULT PRIVILEGES IN SCHEMA my_schema, your_schema GRANT USAGE ON TYPES TO my_group, GROUP your_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user GRANT USAGE ON SCHEMAS TO my_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user GRANT CREATE ON SCHEMAS TO my_group;

ALTER DEFAULT PRIVILEGES FOR USER my_user, your_user IN SCHEMA my_schema, your_schema
GRANT SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER
ON TABLES TO GROUP my_group, PUBLIC
WITH GRANT OPTION;

ALTER DEFAULT PRIVILEGES FOR USER my_user REVOKE ALL ON TABLES FROM my_group;
ALTER DEFAULT PRIVILEGES FOR USER my_user IN SCHEMA my_schema REVOKE SELECT ON TABLES FROM GROUP my_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user IN SCHEMA my_schema, your_schema REVOKE INSERT ON TABLES FROM PUBLIC CASCADE;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user IN SCHEMA my_schema REVOKE UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER ON TABLES FROM PUBLIC RESTRICT;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user, your_user REVOKE ALL PRIVILEGES ON SEQUENCES FROM my_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user REVOKE EXECUTE ON FUNCTIONS FROM my_group;
ALTER DEFAULT PRIVILEGES REVOKE EXECUTE ON ROUTINES FROM my_group;
ALTER DEFAULT PRIVILEGES IN SCHEMA my_schema, your_schema REVOKE USAGE ON TYPES FROM my_group, GROUP your_group;
ALTER DEFAULT PRIVILEGES FOR ROLE my_user REVOKE USAGE, CREATE ON TYPES FROM my_group;

ALTER DEFAULT PRIVILEGES FOR ROLE my_user, your_user IN SCHEMA my_schema, your_schema
REVOKE SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER
ON TABLES FROM GROUP my_group, PUBLIC
CASCADE;
