current_role

A function returning the current user name

current_role is a system function returning the name of the current role under which statements will be executed.

current_role was added in PostgreSQL 8.1 as an SQL-compatible equivalent of current_user, although it was not documented until PostgreSQL 10.

Change history

Categories

System function, Users and roles

See also

current_user