Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8B909133798E for ; Wed, 9 Mar 2011 01:46:03 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 14804-06 for ; Wed, 9 Mar 2011 05:45:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E0C311336FA7 for ; Wed, 9 Mar 2011 01:45:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p295jmOC010430; Wed, 9 Mar 2011 00:45:48 -0500 (EST) To: Robert Haas cc: Alvaro Herrera , Euler Taveira de Oliveira , Owen Jacobson , pgsql-bugs Subject: Re: CREATEROLE does not permit commenting on newly-created roles In-reply-to: References: <4D75B945.7040304@timbira.com> <1299599930-sup-5129@alvh.no-ip.org> <11529.1299600744@sss.pgh.pa.us> <9098.1299646108@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Wed, 09 Mar 2011 00:18:18 -0500" Date: Wed, 09 Mar 2011 00:45:48 -0500 Message-ID: <10429.1299649548@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/161 X-Sequence-Number: 29671 Robert Haas writes: > On Tue, Mar 8, 2011 at 11:48 PM, Tom Lane wrote: >> In particular, I suggest the attached patch (code-complete, but sans >> documentation changes). > I think it's a good change, but we should make sure to release-note it > properly, I had already drafted a commit message: Adjust the permissions required for COMMENT ON ROLE. Formerly, any member of a role could change the role's comment, as of course could superusers; but holders of CREATEROLE privilege could not, unless they were also members. This led to the odd situation that a CREATEROLE holder could create a role but then could not comment on it. It also seems a bit dubious to let an unprivileged user change his own comment, let alone those of group roles he belongs to. So, change the rule to be "you must be superuser to comment on a superuser role, or hold CREATEROLE to comment on non-superuser roles". This is the same as the privilege check for creating/dropping roles, and thus fits much better with the rule for other object types, namely that only the owner of an object can comment on it. Per complaint from Owen Jacobson and subsequent discussion. How that gets boiled down into a release note will depend on whoever writes the release notes. > along with the change you made for PLs. Hrm? regards, tom lane