Fix documentation error: GRANT/REVOKE for roles only accept role names
authorTom Lane
Wed, 2 Aug 2006 16:29:49 +0000 (16:29 +0000)
committerTom Lane
Wed, 2 Aug 2006 16:29:49 +0000 (16:29 +0000)
as grantees, not PUBLIC ... and you can't say GROUP either.  Noted by
Brian Hurt.

doc/src/sgml/ref/grant.sgml
doc/src/sgml/ref/revoke.sgml
doc/src/sgml/user-manag.sgml

index 9b1ed1aebae1c06caeaa33750dd99e447370ef25..d846cd07fde4118f4ccdbeca066b431237b2c1d0 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -50,8 +50,7 @@ GRANT { CREATE | ALL [ PRIVILEGES ] }
     ON TABLESPACE tablespacename [, ...]
     TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
-GRANT role [, ...]
-    TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH ADMIN OPTION ]
+GRANT role [, ...] TO username [, ...] [ WITH ADMIN OPTION ]
 
  
 
@@ -325,6 +324,12 @@ GRANT role [, ...]
    Roles having CREATEROLE privilege can grant or revoke
    membership in any role that is not a superuser.
   
+
+  
+   Unlike the case with privileges, membership in a role cannot be granted
+   to PUBLIC.  Note also that this form of the command does not
+   allow the noise word GROUP.
+  
  
  
 
index bccb8010b5f803d5f01cec8652bf90d64962a46e..df38437436fe3324a36fc2b1672e7c6a237b8a55 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -65,8 +65,7 @@ REVOKE [ GRANT OPTION FOR ]
     [ CASCADE | RESTRICT ]
 
 REVOKE [ ADMIN OPTION FOR ]
-    role [, ...]
-    FROM { username | GROUP groupname | PUBLIC } [, ...]
+    role [, ...] FROM username [, ...]
     [ CASCADE | RESTRICT ]
 
  
@@ -119,6 +118,8 @@ REVOKE [ ADMIN OPTION FOR ]
   
    When revoking membership in a role, GRANT OPTION is instead
    called ADMIN OPTION, but the behavior is similar.
+   Note also that this form of the command does not
+   allow the noise word GROUP.
   
  
 
index 41e6020091993e3607a50586ac3b172a85fd0fa0..c86837d1f7a84b4a7ed815e1c7c577cff56353fb 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
 
  Database Roles and Privileges
@@ -375,7 +375,9 @@ REVOKE group_role FROM role1
 
    You can grant membership to other group roles, too (since there isn't
    really any distinction between group roles and non-group roles).  The
-   only restriction is that you can't set up circular membership loops.
+   database will not let you set up circular membership loops.  Also,
+   it is not permitted to grant membership in a role to
+   PUBLIC.