January 2002
Intermediate to advanced
640 pages
16h 39m
English
Returns the current database username.
CURRENT_USER
This function does not accept parameters.
This function returns the name of the current database user.
Use the CURRENT_USER function to retrieve the name of the current user
in a string of type name (a 31 character length
non-standard type used for storing system identifiers).
The following example displays the current user logged into testdb:
testdb=# SELECT CURRENT_USER AS myself;
myself
--------
jlx
(1 row)