Re: Bug / shortcoming in has_*_privilege

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(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:45:30
Message-ID: 1286937793-sup-1366@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(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.

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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-10-13 03:59:19 Re: security label support, revised
Previous Message Sushant Sinha 2010-10-13 02:20:05 Re: Re: [GENERAL] Text search parser's treatment of URLs and emails