CURRENT_ROLE
Returns the current role. The current role can be set with SET ROLE or SET DEFAULT ROLE.
Syntax
CURRENT_ROLE, CURRENT_ROLE()Description
Examples
SELECT CURRENT_ROLE;
+--------------+
| CURRENT_ROLE |
+--------------+
| NULL |
+--------------+
SET ROLE staff;
SELECT CURRENT_ROLE;
+--------------+
| CURRENT_ROLE |
+--------------+
| staff |
+--------------+Last updated
Was this helpful?

