postgres 权限相关操作

来源:互联网 发布:政府数据分析 编辑:程序博客网 时间:2024/05/21 10:17

Privileges
When an object is created, it is assigned an owner. The owner is normally the role that executed the creation statement. For most kinds of objects, the initial state is that only the owner (or superuser) can do anything with the object. To allow other roles to use it, privileges must be granted.

The right to modify or destroy an object is always the privilege of the owner only.

There are different kinds of privileges:
* SELECT
* INSERT
* UPDATE
* DELETE
* TRUNCATE
* REFERENCES
* TRIGGER
* CREATE
* CONNECT
* TEMPORARY
* EXECUTE
* USAGE

GRANT UPDATE ON accounts TO joe;REVOKE ALL ON accounts FROM PUBLIC;
原创粉丝点击