ALTER DEFAULT PRIVILEGES

From PostgreSQL wiki

(Difference between revisions)
Jump to: navigation, search
(Created page with "=====名字===== ALTER DEFAULT PRIVILEGES -- define default access privileges =====语法概要===== ALTER DEFAULT PRIVILEGES [ FOR { ROLE | USER } '''target_ro…")
 
(语法概要)
Line 8: Line 8:
 
             [ IN SCHEMA '''schema_name''' [, ...] ]
 
             [ IN SCHEMA '''schema_name''' [, ...] ]
 
             '''abbreviated_grant_or_revoke'''
 
             '''abbreviated_grant_or_revoke'''
 
+
   
 
     where '''abbreviated_grant_or_revoke''' is one of:
 
     where '''abbreviated_grant_or_revoke''' is one of:
 
+
   
 
     GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
 
     GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
 
             [, ...] | ALL [ PRIVILEGES ] }
 
             [, ...] | ALL [ PRIVILEGES ] }
Line 36: Line 36:
 
             [, ...] | ALL [ PRIVILEGES ] }
 
             [, ...] | ALL [ PRIVILEGES ] }
 
             ON SEQUENCES
 
             ON SEQUENCES
             FROM { [ GROUP ] role_name | PUBLIC } [, ...]
+
             FROM { [ GROUP ] '''role_name''' | PUBLIC } [, ...]
 
             [ CASCADE | RESTRICT ]
 
             [ CASCADE | RESTRICT ]
 
      
 
      
Line 42: Line 42:
 
             { EXECUTE | ALL [ PRIVILEGES ] }
 
             { EXECUTE | ALL [ PRIVILEGES ] }
 
             ON FUNCTIONS
 
             ON FUNCTIONS
             FROM { [ GROUP ] role_name | PUBLIC } [, ...]
+
             FROM { [ GROUP ] '''role_name''' | PUBLIC } [, ...]
 
             [ CASCADE | RESTRICT ]
 
             [ CASCADE | RESTRICT ]

Revision as of 10:22, 11 June 2013

名字

ALTER DEFAULT PRIVILEGES -- define default access 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