GRANT (Role)
Assigns roles to users or other roles.
Assigns roles to users or other roles.
Note
Granting a role does not activate the role automatically; you must enable it with the SET ROLE statement or specify it as a default role to enable it automatically.Syntax
GRANT role[,...] TO grantee[,...] [ WITH ADMIN OPTION ]
Arguments
role- A role to grant
grantee- User or role to be granted the specified roles, one of the following:
WITH ADMIN OPTION- Gives
granteethe privilege to grant the specified roles to other users or roles. For details, see Granting privileges.
Privileges
Non-superuser: If WITH GRANT OPTION is used, can grant the same roles to other users or roles.