Postgresql 中文操作指南
37.5. applicable_roles #
视图 applicable_roles 识别出当前用户可以使用其权限的所有角色。这意味着从当前用户到所涉角色之间存在一系列角色授权。当前用户本身也是一个适用的角色。一组适用的角色通常用于权限检查。
The view applicable_roles identifies all roles whose privileges the current user can use. This means there is some chain of role grants from the current user to the role in question. The current user itself is also an applicable role. The set of applicable roles is generally used for permission checking.
Table 37.3. applicable_roles Columns
Table 37.3. applicable_roles Columns
Column Type Description |
grantee sql_identifier Name of the role to which this role membership was granted (can be the current user, or a different role in case of nested role memberships) |
role_name sql_identifier Name of a role |
is_grantable yes_or_no YES if the grantee has the admin option on the role, NO if not |