A function returning the current user name
current_user is a system function returning the name of the current role under which statements will be executed.
current_user was added in PostgreSQL 6.3.
Basic usage example for
postgres=# SELECT current_user; current_user -------------- postgres (1 row)