Re: Repetition of warning message while REVOKE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Repetition of warning message while REVOKE
Date
Msg-id 9121.1267719788@sss.pgh.pa.us
Whole thread Raw
In response to Re: Repetition of warning message while REVOKE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Repetition of warning message while REVOKE
Re: Repetition of warning message while REVOKE
List pgsql-hackers
I wrote:
> Piyush Newe <piyush.newe@enterprisedb.com> writes:
>> create table tbl(col int);
>> create user usr;
>> grant select on tbl to usr;
>> \c postgres usr;
>> REVOKE SELECT on tbl from usr;
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> WARNING:  no privileges could be revoked for "tbl"
>> REVOKE

> You really should mention what version you're testing, but for the
> archives: I confirm this on 8.4.x and HEAD.  8.3 seems to behave sanely.

I traced through this and determined that the extra messages are a
consequence of the column-level-privileges patch.
restrict_and_check_grant is invoked both on the whole relation, and
on each column (since we have to get rid of any per-column SELECT
privilege that might have been granted).

I'm not sure offhand about a reasonable way to rearrange the code to
avoid duplicate messages.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Erik Rijkers"
Date:
Subject: Assertion failure twophase.c (2) (testing HS/SR)
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Repetition of warning message while REVOKE