Топ-100
 
RDBMS Type: PostgreSQL
Topic

SET [ SESSION | LOCAL ] ROLE rolename
SET [ SESSION | LOCAL ] ROLE NONE
RESET ROLE

Example

SELECT SESSION_USER, CURRENT_USER;

session_user | current_user
--------------+--------------
peter | peter

SET ROLE 'paul';

SELECT SESSION_USER, CURRENT_USER;

session_user | current_user
--------------+--------------
peter | paul