当我跑\l+进去psql获取所有数据库及其访问权限的列表时,我看到一些数据库具有空白访问权限.当Access privileges列空白时,这意味着什么psql?
如果存在某种默认值,我怎样才能看到默认值是什么?
me=# \l+
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description
-------------+-------------+----------+-------------+-------------+-----------------------+---------+------------+--------------------------------------------
me | me | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | 7239 kB | pg_default |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | 7151 kB | pg_default | default administrative connection database
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +| 7041 kB | pg_default | unmodifiable empty database
| | | | | postgres=CTc/postgres | | |
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +| 7041 kB | pg_default | default template for new databases
| | | | | postgres=CTc/postgres | | |
(4 rows)
Run Code Online (Sandbox Code Playgroud)
What does it mean when the Access privileges column is blank
如果给定对象的"访问权限"列为空,则表示该对象具有默认权限(即,其权限列为空).默认权限始终包括所有者的所有权限,并且可以包括PUBLIC的某些权限,具体取决于对象类型,如上所述
PostgreSQL将某些类型的对象的默认权限授予PUBLIC.默认情况下,对表,列,模式或表空间不授予PUBLIC权限.对于其他类型,授予PUBLIC的默认权限如下:CONNECT和CREATE TEMP TABLE for databases; 函数的EXECUTE特权; 和语言的USAGE特权.当然,对象所有者可以修改默认和明确授予的权限.(为了最大限度地提高安全性,请在创建对象的同一事务中发出REVOKE;然后没有其他用户可以使用该对象的窗口.)此外,可以使用ALTER DEFAULT PRIVILEGES命令更改这些初始默认权限设置.
| 归档时间: |
|
| 查看次数: |
1396 次 |
| 最近记录: |