Postgresql 中文操作指南
37.38. role_udt_grants #
视图 role_udt_grants 用于识别授予了用户定义类型(其中授予者或被授予者是当前启用的角色)的 USAGE 权限。更多信息可以在 udt_privileges 下找到。该视图与 udt_privileges 之间唯一的有效区别在于该视图省略了通过授予 PUBLIC 使当前用户可以访问的对象。由于数据类型在 PostgreSQL 中没有真正的权限,但只有对 PUBLIC 的隐式授予,因此此视图为空。
The view role_udt_grants is intended to identify USAGE privileges granted on user-defined types where the grantor or grantee is a currently enabled role. Further information can be found under udt_privileges. The only effective difference between this view and udt_privileges is that this view omits objects that have been made accessible to the current user by way of a grant to PUBLIC. Since data types do not have real privileges in PostgreSQL, but only an implicit grant to PUBLIC, this view is empty.
Table 37.36. role_udt_grants Columns
Table 37.36. role_udt_grants Columns
Column Type Description |
grantor sql_identifier The name of the role that granted the privilege |
grantee sql_identifier The name of the role that the privilege was granted to |
udt_catalog sql_identifier Name of the database containing the type (always the current database) |
udt_schema sql_identifier Name of the schema containing the type |
udt_name sql_identifier Name of the type |
privilege_type character_data Always TYPE USAGE |
is_grantable yes_or_no YES if the privilege is grantable, NO if not |