ClickHouse/docs/en/operations/system-tables/row_policies.md

36 lines
2.1 KiB
Markdown
Raw Normal View History

2022-08-28 13:53:52 +00:00
---
2022-08-28 13:58:27 +00:00
slug: /en/operations/system-tables/row_policies
2022-08-28 13:53:52 +00:00
---
2022-06-02 10:55:18 +00:00
# row_policies
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
Contains filters for one particular table, as well as a list of roles and/or users which should use this row policy.
Columns:
2023-04-19 16:10:51 +00:00
- `name` ([String](../../sql-reference/data-types/string.md)) — Name of a row policy.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `short_name` ([String](../../sql-reference/data-types/string.md)) — Short name of a row policy. Names of row policies are compound, for example: myfilter ON mydb.mytable. Here "myfilter ON mydb.mytable" is the name of the row policy, "myfilter" is it's short name.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `database` ([String](../../sql-reference/data-types/string.md)) — Database name.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `table` ([String](../../sql-reference/data-types/string.md)) — Table name.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `id` ([UUID](../../sql-reference/data-types/uuid.md)) — Row policy ID.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `storage` ([String](../../sql-reference/data-types/string.md)) — Name of the directory where the row policy is stored.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `select_filter` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — Condition which is used to filter rows.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `is_restrictive` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Shows whether the row policy restricts access to rows, see [CREATE ROW POLICY](../../sql-reference/statements/create/row-policy.md#create-row-policy-as). Value:
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
- `0` — The row policy is defined with `AS PERMISSIVE` clause.
- `1` — The row policy is defined with `AS RESTRICTIVE` clause.
2023-04-19 16:10:51 +00:00
- `apply_to_all` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Shows that the row policies set for all roles and/or users.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `apply_to_list` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — List of the roles and/or users to which the row policies is applied.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
2023-04-19 16:10:51 +00:00
- `apply_to_except` ([Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md))) — The row policies is applied to all roles and/or users excepting of the listed ones.
DOCSUP-1395: Add desc for system tables. (#13852) * Add desc for system tables. * Fixed links, add comments from the developer * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/settings_profile_elements.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/en/operations/system-tables/users.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Link to Enum. * Added translation to russian * Update row_policies.md * Add lost description * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/grants.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Update docs/ru/operations/system-tables/row_policies.md Co-authored-by: BayoNet <da-daos@yandex.ru> * Additions * Fixed links Co-authored-by: Anna Devyatova <annadevyatova@yandex-team.ru> Co-authored-by: BayoNet <da-daos@yandex.ru>
2020-08-31 18:04:37 +00:00
## See Also {#see-also}
- [SHOW POLICIES](../../sql-reference/statements/show.md#show-policies-statement)