postgresql/src/backend/commands
Tom Lane 49a08ca1e9 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.

In passing, clean up the documentation for COMMENT a little bit.

Per complaint from Owen Jacobson and subsequent discussion.
2011-03-09 11:28:34 -05:00
..
Makefile DDL support for collations 2011-02-12 15:55:18 +02:00
aggregatecmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
alter.c DDL support for collations 2011-02-12 15:55:18 +02:00
analyze.c Per-column collation support 2011-02-08 23:04:18 +02:00
async.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
cluster.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
collationcmds.c When creating a collation, check that the locales can be loaded 2011-03-04 22:14:37 +02:00
comment.c Allow non-superusers to create (some) extensions. 2011-03-04 16:08:53 -05:00
constraint.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
conversioncmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
copy.c Rearrange snapshot handling to make rule expansion more consistent. 2011-02-28 23:28:06 -05:00
dbcommands.c DDL support for collations 2011-02-12 15:55:18 +02:00
define.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
discard.c Refactor the executor's API to support data-modifying CTEs better. 2011-02-27 13:44:12 -05:00
explain.c Include the target table in EXPLAIN output for ModifyTable nodes. 2011-03-01 11:37:01 -05:00
extension.c Create extension infrastructure for the core procedural languages. 2011-03-04 21:51:14 -05:00
foreigncmds.c Create the catalog infrastructure for foreign-data-wrapper handlers. 2011-02-19 00:07:15 -05:00
functioncmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
indexcmds.c Per-column collation support 2011-02-08 23:04:18 +02:00
lockcmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
opclasscmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
operatorcmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
portalcmds.c Refactor the executor's API to support data-modifying CTEs better. 2011-02-27 13:44:12 -05:00
prepare.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
proclang.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
schemacmds.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
seclabel.c Refactor seclabel.c to use the new check_object_ownership function. 2011-03-04 17:26:37 -05:00
sequence.c Fix a couple of unlogged tables goofs. 2011-02-22 14:46:19 -05:00
tablecmds.c Don't allow CREATE TABLE AS to create a column with invalid collation 2011-03-04 23:42:07 +02:00
tablespace.c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
trigger.c Refactor the executor's API to support data-modifying CTEs better. 2011-02-27 13:44:12 -05:00
tsearchcmds.c Core support for "extensions", which are packages of SQL objects. 2011-02-08 16:13:22 -05:00
typecmds.c DDL support for collations 2011-02-12 15:55:18 +02:00
user.c Adjust the permissions required for COMMENT ON ROLE. 2011-03-09 11:28:34 -05:00
vacuum.c Avoid having autovacuum workers wait for relation locks. 2011-02-07 22:04:29 -05:00
vacuumlazy.c Don't throw a warning if vacuum sees PD_ALL_VISIBLE flag set on a page that 2011-03-08 20:30:53 +02:00
variable.c Implement genuine serializable isolation level. 2011-02-08 00:09:08 +02:00
view.c Support data-modifying commands (INSERT/UPDATE/DELETE) in WITH. 2011-02-25 18:58:02 -05:00