policy_references

You can view the application information of the Masking Policy and Row Access Policy by querying the view policy_references.

The following fields are provided in policy_references:

字段描述
POLICY_DATABASEThe database to which the policy belongs.
POLICY_NAMEThe name of the policy.
POLICY_TYPEThe type of the policy, including Column Masking and Row Access.
REF_CATALOGThe catalog of the table to which the policy is applied.
REF_DATABASEThe database of the table to which the policy is applied.
REF_OBJECT_NAMEThe name of the table to which the policy is applied.
REF_COLUMNThe name of the column to which the policy is applied.

Example:

MySQL > SELECT * FROM sys.policy_references\G
*************************** 1. row ***************************
POLICY_DATABASE: db_test
    POLICY_NAME: phone_mask
    POLICY_TYPE: Column Masking
    REF_CATALOG: default_catalog
   REF_DATABASE: db_test
REF_OBJECT_NAME: sales_info
     REF_COLUMN: phone
*************************** 2. row ***************************
POLICY_DATABASE: db_test
    POLICY_NAME: region_data
    POLICY_TYPE: Row Access
    REF_CATALOG: default_catalog
   REF_DATABASE: db_test
REF_OBJECT_NAME: sales_info
     REF_COLUMN: NULL
In this article