Топ-100
 
CerebroSQL

SET SESSION AUTHORIZATION

RDBMS Type: PostgreSQL
Topic

SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT
RESET SESSION AUTHORIZATION

Example

SELECT SESSION_USER, CURRENT_USER;

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

SET SESSION AUTHORIZATION 'paul';

SELECT SESSION_USER, CURRENT_USER;

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