pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Euler Taveira de Oliveira <euler@timbira.com>
Cc: Owen Jacobson <owen.jacobson@grimoire.ca>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: CREATEROLE does not permit commenting on newly-created roles
Date: Tue, 08 Mar 2011 11:12:24 -0500
Message-ID: <11529.1299600744@sss.pgh.pa.us> (raw)
In-Reply-To: <1299599930-sup-5129@alvh.no-ip.org>
References: <AANLkTikUMg1VZZ8QoE+kniY8p31k7bmJZ=JB+ABeXLY6@mail.gmail.com>
	<4D75B945.7040304@timbira.com>
	<1299599930-sup-5129@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.com> 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



view thread (10+ messages)  latest in thread

Message-ID: <11529.1299600744@sss.pgh.pa.us>
Permalink:  ../11529.1299600744@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11529.1299600744@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, euler@timbira.com, owen.jacobson@grimoire.ca
  Subject: Re: CREATEROLE does not permit commenting on newly-created roles
  In-Reply-To: <11529.1299600744@sss.pgh.pa.us>
  References: <AANLkTikUMg1VZZ8QoE+kniY8p31k7bmJZ=JB+ABeXLY6@mail.gmail.com> <4D75B945.7040304@timbira.com> <1299599930-sup-5129@alvh.no-ip.org> <11529.1299600744@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox