

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://amazonaws-china.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# SVV\$1RLS\$1APPLIED\$1POLICY
<a name="r_SVV_RLS_APPLIED_POLICY"></a>

Use SVV\$1RLS\$1APPLIED\$1POLICY to trace the application of RLS policies on queries that reference RLS-protected relations.

SVV\$1RLS\$1APPLIED\$1POLICY is visible to the following users:
+ Superusers
+ Users with the `sys:operator` role
+ Users with the ACCESS SYSTEM TABLE permission

Note that sys:secadmin isn't granted this system permission.

## Table columns
<a name="r_SVV_RLS_APPLIED_POLICY-table-columns"></a>

[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/redshift/latest/dg/r_SVV_RLS_APPLIED_POLICY.html)

## Sample query
<a name="r_SVV_RLS_APPLIED_POLICY-sample-query"></a>

The following example displays the result of the SVV\$1RLS\$1APPLIED\$1POLICY. To query the SVV\$1RLS\$1APPLIED\$1POLICY, you must have the ACCESS SYSTEM TABLE permission.

```
-- Check what RLS policies were applied to the run query.
SELECT username, command, datname, relschema, relname, polname, poldefault
FROM svv_rls_applied_policy
WHERE datname = CURRENT_DATABASE() AND query = PG_LAST_QUERY_ID();

 username | command |  datname  | relschema |          relname         |      polname    | poldefault 
----------+---------+-----------+-----------+--------------------------+-----------------+------------
   molly  |    s    | tickit_db |   public  | tickit_category_redshift | policy_concerts |
```