

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

# SVV\$1USER\$1GRANTS
<a name="r_SVV_USER_GRANTS"></a>

使用 SVV\$1USER\$1GRANTS 查看在集群中被显式授予了角色的用户列表。

SVV\$1USER\$1GRANTS 对以下用户可见：
+ 超级用户
+ 拥有 ACCESS SYSTEM TABLE 权限的用户

其他用户只能看到明确授予给他们的角色。

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

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

## 示例查询
<a name="r_SVV_USER_GRANTS-sample-queries"></a>

以下查询将向用户授予角色并显示被显式授予了角色的用户列表。

```
GRANT ROLE role1 TO reguser;
GRANT ROLE role2 TO reguser;
GRANT ROLE role1 TO superuser;
GRANT ROLE role2 TO superuser;

SELECT user_name,role_name,admin_option FROM svv_user_grants;

 user_name | role_name | admin_option
-----------+-----------+--------------
 superuser |  role1    | False
 reguser   |  role1    | False
 superuser |  role2    | False
  reguser  |  role2    | False
```