v.21.9New Feature

Add currentRoles, enabledRoles, and defaultRoles functions

Add new functions currentRoles(), enabledRoles(), defaultRoles(). #26780 (Vitaly Baranov).
Introduces new SQL functions currentRoles(), enabledRoles(), and defaultRoles() to query role information within ClickHouse sessions.

Why it matters

These functions provide users with the ability to retrieve information about roles currently active or available in their ClickHouse session, enhancing security management and access control visibility.

How to use it

Users can call the functions directly in SQL queries to obtain role information. For example, use SELECT currentRoles() to get the roles assigned to the current session.