SET ROLE statement

Synopsis

SET ROLE ( role | ALL | NONE )

Syntax Diagram

Read syntax diagramSkip visual syntax diagramSET ROLE(roleALLNONE)

For information on reading syntax diagrams, see How to read syntax diagrams

Description

SET ROLE sets the enabled role for the current session in the current catalog.

SET ROLE role enables a single specified role for the current session. For the SET ROLE role statement to succeed, the user who is running it must have a grant for the given role.

SET ROLE ALL enables all roles that the current user is granted for the current session.

SET ROLE NONE disables all the roles that are granted to the current user for the current session.

Limitations

Some connectors do not support role management. See connector documentation for more details.