SESSION_USER

Returns a VARCHAR containing the name of the user who initiated the current database session.

Behavior Type

Stable

Syntax

SESSION_USER()

Notes

Examples

SELECT SESSION_USER();
 session_user 
--------------
 dbadmin
(1 row)

The following command returns the same results without the parentheses:

SELECT SESSION_USER;
 session_user 
--------------
 dbadmin
(1 row)