Postgresql 中文操作指南

53.17. pg_default_acl #

目录 pg_default_acl 存储分配给新创建对象的初始权限。

The catalog pg_default_acl stores initial privileges to be assigned to newly created objects.

Table 53.17. pg_default_acl Columns

Table 53.17. pg_default_acl Columns

Column Type

Description

oid oid

Row identifier

defaclrole oid (references pg_authid.oid)

The OID of the role associated with this entry

defaclnamespace oid (references pg_namespace.oid)

The OID of the namespace associated with this entry, or zero if none

defaclobjtype char

Type of object this entry is for: r = relation (table, view), S = sequence, f = function, T = type, n = schema

defaclacl aclitem[]

Access privileges that this type of object should have on creation

pg_default_acl 条目显示分配给属于指定用户的对象的初始授权。目前有两种条目类型:“全局”条目,defaclnamespace = 零,“每个模式”条目,引用特定模式。如果存在全局条目,则它 overrides 对象类型的正常硬连线默认授权。如果存在每个模式的条目,则表示要 added to 全局或硬连线默认授权的授权。

A pg_default_acl entry shows the initial privileges to be assigned to an object belonging to the indicated user. There are currently two types of entry: “global” entries with defaclnamespace = zero, and “per-schema” entries that reference a particular schema. If a global entry is present then it overrides the normal hard-wired default privileges for the object type. A per-schema entry, if present, represents privileges to be added to the global or hard-wired default privileges.

请注意,当其他目录中的 ACL 条目为空时,它被视为表示对其对象的硬连线默认授权,not 无论 pg_default_acl 中现有什么。pg_default_acl 仅在创建对象期间咨询。

Note that when an ACL entry in another catalog is null, it is taken to represent the hard-wired default privileges for its object, not whatever might be in pg_default_acl at the moment. pg_default_acl is only consulted during object creation.