ALTER DEFAULT PRIVILEGES

From PostgreSQL wiki

(Difference between revisions)
Jump to: navigation, search
(语法概要)
(名字)
Line 1: Line 1:
 
=====名字=====
 
=====名字=====
  
ALTER DEFAULT PRIVILEGES -- define default access privileges
+
ALTER DEFAULT PRIVILEGES -- 定义缺省访问权限
  
 
=====语法概要=====
 
=====语法概要=====

Revision as of 11:17, 12 June 2013

名字

ALTER DEFAULT PRIVILEGES -- 定义缺省访问权限

语法概要
   ALTER DEFAULT PRIVILEGES
           [ FOR { ROLE | USER } target_role [, ...] ]
           [ IN SCHEMA schema_name [, ...] ]
           abbreviated_grant_or_revoke
   
   where abbreviated_grant_or_revoke is one of:
   
   GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
           [, ...] | ALL [ PRIVILEGES ] }
           ON TABLES
           TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ]
   
   GRANT { { USAGE | SELECT | UPDATE }
           [, ...] | ALL [ PRIVILEGES ] }
           ON SEQUENCES
           TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ]
   
   GRANT { EXECUTE | ALL [ PRIVILEGES ] }
           ON FUNCTIONS
           TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ]
   
   REVOKE [ GRANT OPTION FOR ]
           { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
           [, ...] | ALL [ PRIVILEGES ] }
           ON TABLES
           FROM { [ GROUP ] role_name | PUBLIC } [, ...]
           [ CASCADE | RESTRICT ]
   
   REVOKE [ GRANT OPTION FOR ]
           { { USAGE | SELECT | UPDATE }
           [, ...] | ALL [ PRIVILEGES ] }
           ON SEQUENCES
           FROM { [ GROUP ] role_name | PUBLIC } [, ...]
           [ CASCADE | RESTRICT ]
   
   REVOKE [ GRANT OPTION FOR ]
           { EXECUTE | ALL [ PRIVILEGES ] }
           ON FUNCTIONS
           FROM { [ GROUP ] role_name | PUBLIC } [, ...]
           [ CASCADE | RESTRICT ]
Personal tools