Redshift Observatory

System Table Tracker

System view pg_catalog.svv_rls_applied_policy version 1.0.52931 / 2023-07-07

schema name column data type
pg_catalog svv_rls_applied_policy command char(1)
pg_catalog svv_rls_applied_policy datname text
pg_catalog svv_rls_applied_policy pid int4
pg_catalog svv_rls_applied_policy poldefault text
pg_catalog svv_rls_applied_policy polname text
pg_catalog svv_rls_applied_policy query int4
pg_catalog svv_rls_applied_policy recordtime timestamp
pg_catalog svv_rls_applied_policy relname text
pg_catalog svv_rls_applied_policy relschema text
pg_catalog svv_rls_applied_policy username text
pg_catalog svv_rls_applied_policy xid int8

View Text

SELECT rtrim(CAST(pgu.usename AS text)) AS username,
       pqm.query,
       rap.xid,
       rap.pid,
       rap.recordtime,
       rap.command,
       rtrim(CAST(pgd.datname AS text)) AS datname,
       rtrim(CAST(pgn.nspname AS text)) AS relschema,
       rtrim(CAST(pgc.relname AS text)) AS relname,
       rtrim(CAST(pgp.polname AS text)) AS polname,
       rtrim(CAST(rap.poldefault AS text)) AS poldefault
FROM stl_rls_applied_policy AS rap
     LEFT JOIN pg_class AS pgc ON pgc.oid = CAST(rap.relid AS oid)
     LEFT JOIN pg_namespace AS pgn ON pgn.oid = pgc.relnamespace
     LEFT JOIN pg_policy AS pgp ON pgp.polid = CAST(rap.polid AS oid)
     LEFT JOIN pg_user AS pgu ON pgu.usesysid = rap.userid
     LEFT JOIN pg_database AS pgd ON pgd.oid = CAST(rap.dbid AS oid)
     LEFT JOIN stl_plan_qid_map AS pqm ON pqm.plan_qid = rap.plan_qid
WHERE lower(CAST(rap.policy_provider AS text)) = CAST('redshift' AS text)
   OR rap.policy_provider IS NULL


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