Default Roles
By default, when a role is granted to a user, that role is enabled for that user. To enhance security, you can disable a role by default. When the user connects, they will have to enable the role themselves. If the role has a password, the user must enter that password before the role is enabled.
ALTER USER tom DEFAULT ROLE ALL EXCEPT yourRoleName;
When you connect as tom, you need to enable yourRoleName using SET ROLE:
CONNECT tom/password
SET ROLE yourRoleName IDENTIFIED BY password;
You can set your role to "none" (i.e. no role) using the following statement:
SET ROLE NONE;
You can set your role to "all roles" except aParticularRole using:
SET ROLE ALL EXCEPT aParticularRole;