Re: Bug / shortcoming in has_*_privilege - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Bug / shortcoming in has_*_privilege
Date
Msg-id 1286937793-sup-1366@alvh.no-ip.org
Whole thread Raw
In response to Re: Bug / shortcoming in has_*_privilege  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Responses Re: Bug / shortcoming in has_*_privilege
List pgsql-hackers
Excerpts from Itagaki Takahiro's message of mar oct 12 23:05:36 -0300 2010:
> Hi,
> 
> On Tue, Sep 7, 2010 at 6:16 AM, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
> > Excerpts from Jim Nasby's message of jue jun 10 17:54:43 -0400 2010:
> >> test_us@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.

Yeah, only lowercase.  Identifiers other than "public" (all lowercase)
are allowed as role names, so we cannot use them for this purpose.  Keep
in mind that the docs say PUBLIC without the quotes, which is lowercased.

> BTW, does the patch need to be back-patched to older versions?

There's no intention to do so.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Sushant Sinha
Date:
Subject: Re: Re: [GENERAL] Text search parser's treatment of URLs and emails
Next
From: Bruce Momjian
Date:
Subject: Re: security label support, revised