SVV_ATTACHED_MASKING_POLICY - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

SVV_ATTACHED_MASKING_POLICY

Use SVV_ATTACHED_MASKING_POLICY to view all the relations and roles/users with policies attached on the currently connected database.

Only superusers and users with the sys:secadmin role can view SVV_ATTACHED_MASKING_POLICY. Regular users will see 0 rows.

Table columns

Column name Data type Description
policy_name text The name of the masking policy attached to the table.
schema_name text The schema of the table to which the policy is attached.
table_name text The name of the table to which the policy is attached.
table_type text The type of the table to which the policy is attached.
grantor text The name of the user that attached the policy.
grantee text The name of the user/role to whom the policy is attached.
grantee_type text The type of grantee. This can be role, user, or public.
priority int The priority of the attached policy.
input_columns text The input column attributes of the attached policy.
output_columns text The output column attributes of the attached policy.

Internal functions

SVV_ATTACHED_MASKING_POLICY supports the following internal functions:

mask_get_policy_for_role_on_column

Get the highest priority policy that applies to a given column/role pair.

Syntax

mask_get_policy_for_role_on_column (relschema, relname, colname, rolename);

Parameters

relschema

The name of the schema the policy is in.

relname

The name of the table the policy is in.

colname

The name of the column the policy is attached to.

rolename

The name of the role the policy is attached to.

mask_get_policy_for_user_on_column

Get the highest priority policy that applies to a given column/user pair.

Syntax

mask_get_policy_for_user_on_column (relschema, relname, colname, username);

Parameters

relschema

The name of the schema the policy is in.

relname

The name of the table the policy is in.

colname

The name of the column the policy is attached to.

rolename

The name of the user the policy is attached to.