USER

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

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

Behavior type

Stable

Syntax

USER()

Notes

Examples

=> SELECT USER();
 current_user
--------------
 dbadmin
(1 row)

The following command returns the same results without the parentheses:

=> SELECT USER;
 current_user
--------------
 dbadmin
(1 row)