Skip site navigation (1) Skip section navigation (2)

Re: Bug / shortcoming in has_*_privilege

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Jim Nasby <jim(at)nasby(dot)net>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug / shortcoming in has_*_privilege
Date: 2010-10-13 02:05:36
Message-ID: AANLkTimM51-05qfqwQ7rjWnaoY=QxsKiqTMjK359ZCd6@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

On Tue, Sep 7, 2010 at 6:16 AM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Jim Nasby's message of jue jun 10 17:54:43 -0400 2010:
>> test_us(at)workbook=# select has_table_privilege( 'public', 'test', 'SELECT' );
>> ERROR:  role "public" does not exist
>
> Here's a patch implementing this idea.

It specially treats only "public" in all lower cases, right?
The pseudo-role name is described as "PUBLIC" (upper) in docs,
but we accept only "public" (lower) as the pseudo-name.

BTW, does the patch need to be back-patched to older versions?
Since they use get_roleid_checked() instead of get_role_oid(), the fix
cannot be applied cleanly to them, though it will be similar codes.

-- 
Itagaki Takahiro

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-10-13 02:10:05
Subject: Re: Bug / shortcoming in has_*_privilege
Previous:From: KaiGai KoheiDate: 2010-10-13 01:04:52
Subject: Re: security hook on table creation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group