Redshift Observatory

System Table Tracker

System view pg_catalog.svv_rls_policy version 1.0.63205 / 2024-02-14

schema name column data type
pg_catalog svv_rls_policy polalias varchar(256)
pg_catalog svv_rls_policy polatts varchar(256)
pg_catalog svv_rls_policy poldb varchar(128)
pg_catalog svv_rls_policy polenabled bool
pg_catalog svv_rls_policy polmodifiedby varchar(128)
pg_catalog svv_rls_policy polmodifiedtime timestamp
pg_catalog svv_rls_policy polname varchar(128)
pg_catalog svv_rls_policy polqual varchar(256)

View Text

SELECT CAST(d.datname AS varchar) AS poldb,
       CAST(p.polname AS varchar) AS polname,
       CAST(p.polalias AS varchar) AS polalias,
       rls_policy_atts_out(CAST(p.polatts AS varchar)) AS polatts,
       CAST(p.polqual AS varchar) AS polqual,
       p.polenabled,
       CAST(u.usename AS varchar) AS polmodifiedby,
       p.polmodifiedtime
FROM pg_policy 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 RLS 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