v.21.9New Feature
New functions currentProfiles(), enabledProfiles(), and defaultProfiles() added
New functionscurrentProfiles(),enabledProfiles(),defaultProfiles(). #26714 (Vitaly Baranov).
Why it matters
These functions provide users with a way to introspect and manage user profiles effectively by returning the profiles currently applied to the session, those enabled for the user, and the default profiles respectively. This enhances visibility and control over access and settings tied to user profiles.How to use it
Use the new functions in your queries to fetch profile information as follows:SELECT currentProfiles();
SELECT enabledProfiles();
SELECT defaultProfiles();These functions can be used standalone or within complex queries to dynamically adapt behavior based on the user's profile setup.