Skip to main content
Version: Candidate-4.0

policy_references

note

This view applies to a feature not available in StarRocks.

You can view the objects row access policies and column masking policies reference by querying the view policy_references.

The following fields are provided in policy_references:

FieldDescription
POLICY_DATABASEThe database where the policy is located. The namespace of the policy is the database, which is allowed only under default_catalog.
POLICY_NAMEThe name of the policy.
POLICY_TYPEThe type of the policy. Valid values: Row Access and Column Masking.
REF_CATALOGThe catalog where the policy is referenced.
REF_DATABASEThe database where the policy is referenced.
REF_OBJECT_NAMEThe table where the policy is referenced.
REF_COLUMNThe column where the policy is referenced. This field is always NULL for row access policies.

Example:

mysql > SELECT * FROM policy_references\G
*************************** 1. row ***************************
POLICY_DATABASE: test_db
POLICY_NAME: region_data
POLICY_TYPE: Row Access
REF_CATALOG: default_catalog
REF_DATABASE: test_db
REF_OBJECT_NAME: test1 -- 葨名
REF_COLUMN: NULL
*************************** 2. row ***************************
POLICY_DATABASE: test_db
POLICY_NAME: phone_mask
POLICY_TYPE: Column Masking
REF_CATALOG: default_catalog
REF_DATABASE: test_db
REF_OBJECT_NAME: test
REF_COLUMN: phone
2 rows in set (0.03 sec)