PostgreSQL user
PostgreSQL user
returns the name of the current user (the user of the current execution context).
The user
is equivalent to current_user()
and current_user
.
user
Syntax
Here is the syntax of the PostgreSQL user
function:
user -> name
Parameters
PostgreSQL user
does not require any parameters.
Return value
PostgreSQL user
returns the name of the current user (the user of the current execution context).
user
Examples
To get the user of the current execution context, use the SELECT
statement with user
:
SELECT user;
user
--------------
postgres