From: Tom Lane Date: Wed, 2 Aug 2006 16:30:00 +0000 (+0000) Subject: Fix documentation error: GRANT/REVOKE for roles only accept role names X-Git-Tag: REL8_1_5~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc84334f1e9152ee7a59abd1b90e375d0d2ed7a0;p=postgresql Fix documentation error: GRANT/REVOKE for roles only accept role names as grantees, not PUBLIC ... and you can't say GROUP either. Noted by Brian Hurt. --- diff --git a/doc/src/sgml/ref/grant.sgml b/doc/src/sgml/ref/grant.sgml index bb9571abd8..9c9f08f430 100644 --- a/doc/src/sgml/ref/grant.sgml +++ b/doc/src/sgml/ref/grant.sgml @@ -1,5 +1,5 @@ @@ -45,8 +45,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 ] @@ -300,6 +299,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. + diff --git a/doc/src/sgml/ref/revoke.sgml b/doc/src/sgml/ref/revoke.sgml index 68c69f8814..0725d1c3a8 100644 --- a/doc/src/sgml/ref/revoke.sgml +++ b/doc/src/sgml/ref/revoke.sgml @@ -1,5 +1,5 @@ @@ -58,8 +58,7 @@ REVOKE [ GRANT OPTION FOR ] [ CASCADE | RESTRICT ] REVOKE [ ADMIN OPTION FOR ] - role [, ...] - FROM { username | GROUP groupname | PUBLIC } [, ...] + role [, ...] FROM username [, ...] [ CASCADE | RESTRICT ] @@ -112,6 +111,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. diff --git a/doc/src/sgml/user-manag.sgml b/doc/src/sgml/user-manag.sgml index fb8f84a491..514a52f80e 100644 --- a/doc/src/sgml/user-manag.sgml +++ b/doc/src/sgml/user-manag.sgml @@ -1,5 +1,5 @@ @@ -377,7 +377,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.