SET ROLE

Function

Sets the current user identifier of the current session.

Precautions

Syntax

Parameter Description

Examples

Set the current user to paul:

1
SET ROLE paul PASSWORD '{password}';

View the current session user and the current user:

1
SELECT SESSION_USER, CURRENT_USER;

Reset the current user:

1
RESET role;