ClickHouse/docs/en/sql-reference/statements/create/settings-profile.md
Anna 0a9f6b1805
DOCSUP-2193: Describe SHOW queries for RBAC (#14515)
* Documentation for #10387, upd syntax by issues #12311, #12312

* Update docs/ru/sql-reference/statements/show.md

Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru>
Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-09-08 10:35:24 +03:00

956 B

toc_priority toc_title
9 SETTINGS PROFILE

CREATE SETTINGS PROFILE

Creates a settings profile that can be assigned to a user or a role.

Syntax:

CREATE SETTINGS PROFILE [IF NOT EXISTS | OR REPLACE] TO name [ON CLUSTER cluster_name]
    [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | INHERIT 'profile_name'] [,...]

ON CLUSTER clause allows creating settings profiles on a cluster, see Distributed DDL.

Example

Create the max_memory_usage_profile settings profile with value and constraints for the max_memory_usage setting and assign it to user robin:

CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin