Re: Why grantor is owner in this case?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: donniehan <donniehan(at)126(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Why grantor is owner in this case?
Date: 2009-12-28 15:19:37
Message-ID: 10042.1262013577@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> donniehan wrote:
>> I'm sorry to bother you. i really care about this behavior, but i couldn't find the discussions you mentioned in pgsql-hackers archives.
>> Would you please tell me more about the discussions(about date? the related issue?), so that i can search it and find it more easily?

> Maybe he's referring to this discussion:
> http://archives.postgresql.org/message-id/1176775180.4152.97.camel%40dogma.v10.wvs

No, it's a lot older than that. See
http://archives.postgresql.org/pgsql-hackers/2003-10/msg01497.php
http://archives.postgresql.org/pgsql-committers/2003-10/msg00305.php

The original 7.4-devel behavior made it effectively impossible for a
superuser to *revoke* privileges, which is certainly not acceptable in
practice.

Looking at the CVS history of aclchk.c, I notice that we later installed
a similar provision with respect to roles: grants/revokes are done as
the role that owns the object, not as the role member that is actually
issuing the command. Otherwise other role members can't adjust the
privileges.

This comes down to the fact that privileges granted on the same object
by two different roles are distinct, and you can only revoke the ones
you granted. Which AFAICT is required behavior per SQL spec.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jaime Casanova 2009-12-28 15:38:41 Re: How to use read uncommitted transaction level and set update order
Previous Message fernando 2009-12-28 11:47:53 Re: Java Postgres drivers.