Redshift Observatory

System Table Tracker

System view pg_catalog.svv_masking_policy version 1.0.67699 / 2024-05-26

schema name column data type
pg_catalog svv_masking_policy input_columns varchar(256)
pg_catalog svv_masking_policy policy_database varchar(128)
pg_catalog svv_masking_policy policy_expression varchar(256)
pg_catalog svv_masking_policy policy_modified_by varchar(128)
pg_catalog svv_masking_policy policy_modified_time timestamp
pg_catalog svv_masking_policy policy_name varchar(128)

View Text

SELECT CAST(d.datname AS varchar) AS policy_database,
       CAST(p.polname AS varchar) AS policy_name,
       mask_policy_atts_out(CAST(p.polattrs AS varchar)) AS input_columns,
       mask_policy_expr_out(CAST(p.polexpr AS varchar)) AS policy_expression,
       CAST(u.usename AS varchar) AS policy_modified_by,
       p.polmodifiedtime AS policy_modified_time
FROM pg_policy_mask AS p
     INNER JOIN pg_database AS d ON d.oid = p.poldbid
     LEFT JOIN pg_user AS u ON u.usesysid = p.polmodifiedby
WHERE EXISTS (SELECT 1
              FROM pg_identity
              WHERE pg_identity.useid = current_user_id()
                AND pg_identity.usesuper = TRUE)
   OR has_system_privilege(CAST("current_user"() AS name),
                           CAST('CREATE MASKING POLICY' AS text))


Home 3D Друк Blog Bring-Up Times Consultancy Cross-Region Benchmarks Email Forums IRC Mailing Lists Reddit Redshift Price Tracker Redshift Version Tracker Redshift Workbench System Table Tracker The Known Universe Twitter White Papers