

 从补丁 198 开始，Amazon Redshift 将不再支持创建新的 Python UDF。现有的 Python UDF 将继续正常运行至 2026 年 6 月 30 日。有关更多信息，请参阅[博客文章](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)。

# SVV\$1RLS\$1ATTACHED\$1POLICY
<a name="r_SVV_RLS_ATTACHED_POLICY"></a>

使用 SVV\$1RLS\$1ATTACHED\$1POLICY 以查看已在当前连接的数据库上附加了一个或多个行级别安全性策略的所有关系和用户的列表。

只有拥有 sys:secadmin 角色的用户才能查询此视图。

## 表列
<a name="r_SVV_RLS_ATTACHED_POLICY-table-columns"></a>

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/redshift/latest/dg/r_SVV_RLS_ATTACHED_POLICY.html)

## 示例查询
<a name="r_SVV_RLS_ATTACHED_POLICY-sample-query"></a>

以下示例显示了 SVV\$1RLS\$1ATTACHED\$1POLICY 的结果。

```
--Inspect the policy in SVV_RLS_ATTACHED_POLICY
SELECT * FROM svv_rls_attached_policy;

 relschema |        relname           | relkind |     polname     | grantor | grantee  | granteekind | is_pol_on | is_rls_on | rls_conjuntion_type
-----------+--------------------------+---------+-----------------+---------+----------+-------------+-----------+-----------+---------------------
 public    | tickit_category_redshift |  table  | policy_concerts |   bob   |  analyst |    role     |    True   |    True   |      and
 public    | tickit_category_redshift |  table  | policy_concerts |   bob   |  dbadmin |    role     |    True   |    True   |      and
```