Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0D5271337B3E for ; Tue, 8 Mar 2011 12:12:38 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 68472-03 for ; Tue, 8 Mar 2011 16:12:27 +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 547D9133798E for ; Tue, 8 Mar 2011 12:12:27 -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 p28GCONL011530; Tue, 8 Mar 2011 11:12:24 -0500 (EST) To: Alvaro Herrera cc: Euler Taveira de Oliveira , Owen Jacobson , pgsql-bugs Subject: Re: CREATEROLE does not permit commenting on newly-created roles In-reply-to: <1299599930-sup-5129@alvh.no-ip.org> References: <4D75B945.7040304@timbira.com> <1299599930-sup-5129@alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Tue, 08 Mar 2011 13:00:12 -0300" Date: Tue, 08 Mar 2011 11:12:24 -0500 Message-ID: <11529.1299600744@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/154 X-Sequence-Number: 29664 Alvaro Herrera writes: > Excerpts from Euler Taveira de Oliveira's message of mar mar 08 02:06:13 -0300 2011: >> Em 07-03-2011 16:53, Owen Jacobson escreveu: >>> psql:repro.sql:2: ERROR: must be member of role "commented_role" to >>> comment upon it >> This isn't a bug; let say it is a limitation (and a documented one [1]). >> Unfortunately only the role, superuser or its members can add/drop comments. > Maybe it would be good to have a COMMENT clause on the CREATE ROLE > command. It would be inconsistent with the rest of the comment system, > but this privilege problem is inconsistent too. I thought there was nothing particularly unreasonable about Owen's suggestion: let users with the CREATEROLE attribute comment on any role. I don't think COMMENT added to CREATE ROLE would be a very nice fix (aside from being ugly, what if you want to change the comment later?). It strikes me actually that letting members of the role comment on it is not an amazingly good idea. They are not owners of the role in any meaningful sense --- for instance, they can't drop it. It'd be more reasonable and consistent to say that only superusers and holders of CREATEROLE can do COMMENT ON ROLE. regards, tom lane