PostgreSQL将某些类型的对象的默认权限授予PUBLIC。默认情况下,对表,列,模式或表空间不授予PUBLIC权限。对于其他类型,授予PUBLIC的默认权限如下:CONNECT和CREATE TEMP TABLE for databases;函数的EXECUTE特权;和USAGE语言特权。
类型没有被提及为获取默认权限,为什么我会看到以下内容:
> CREATE TYPE bug_status AS ENUM ('new', 'open', 'closed');
> REVOKE USAGE ON TYPE bug_status FROM postgres;
> \dT+ bug_status
List of data types
Schema | Name | Internal name | Size | Elements | Owner | Access privileges | Description
--------+------------+---------------+------+----------+----------+-------------------+-------------
public | bug_status | bug_status | 4 | new +| postgres | =U/postgres |
| | | | open +| | |
| | | | closed | | |
我已撤销所有者的USAGE,但PUBLIC有此权限。
我错过了记录的地方吗?
答案 0 :(得分:1)