Skip to content

SQL Reference

CURRENT_ROLE

SELECT CURRENT_ROLE;
myusername

The CURRENT_ROLE function in PostgreSQL returns the name of the current role for the active session. In the output, myusername represents the current role name that the function returned.