May 2018
Intermediate to advanced
576 pages
30h 25m
English
The steps are as follows:
postgres=# create user alice noinherit;CREATE ROLEpostgres=# create user bob noinherit; CREATE ROLE
postgres=# create group sales; CREATE ROLEpostgres=# create group marketing; CREATE ROLEpostgres=# grant postgres to marketing; GRANT ROLE
postgres=# grant sales to alice; GRANT ROLEpostgres=# grant marketing to alice; GRANT ROLEpostgres=# grant sales to bob; GRANT ROLE
After you do this, the users alice and bob have no rights after login, but they can assume the sales role by executing SET ROLE TO sales, and alice ...