USER
Returns a VARCHAR containing the name of the user who initiated the current database connection.
Behavior Type
Syntax
USER()
Notes
- The USER function does not require parentheses.
- USER is equivalent to CURRENT_USER, SESSION_USER, and USERNAME.
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)