A role is a database object that packages a set of privileges.Roles implement the concept of access control at a group level.Multiple privileges are granted to the role and then that role can be granted to or revoked from one or many users, or even other roles.
A role that has been granted as a “default” role will be activated automatically.Otherwise, a user must supply that role in their login credentials — or with SET ROLE
— to exercise the associated privileges.Any other privileges granted to the user directly are not affected by their login with the role.
Logging in with multiple explicit roles simultaneously is not supported, but a user can have multiple default roles active at the same time.
In this section the tasks of creating and dropping roles are discussed.