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

Re: Bug / shortcoming in has_*_privilege

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug / shortcoming in has_*_privilege
Date: 2010-06-11 00:46:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, Jun 10, 2010 at 5:54 PM, Jim Nasby <jim(at)nasby(dot)net> wrote:
> test_us(at)workbook=# select has_table_privilege( 'public', 'test', 'SELECT' );
> ERROR:  role "public" does not exist
> test_us(at)workbook=#
> So there's no way to see if a particular privilege has been granted to public. ISTM 'public' should be accepted, since you can't use it as a role name anyway...
> test_us(at)workbook=# create role public;
> ERROR:  role name "public" is reserved
> test_us(at)workbook=# create role "public";
> ERROR:  role name "public" is reserved

It's a bit sticky - you could make that work for
has_table_privilege(name, oid, text) or has_table_privilege(name,
text, text), but what would you do about the versions whose first
argument is an oid?  It would seem a bit awkward to have the behavior
by asymmetrical, although I guess we could...

Robert Haas
The Enterprise Postgres Company

In response to


pgsql-hackers by date

Next:From: Takahiro ItagakiDate: 2010-06-11 02:20:00
Subject: Re: ps display "waiting for max_standby_delay"
Previous:From: Bruce MomjianDate: 2010-06-10 23:15:49
Subject: Re: Invalid YAML output from EXPLAIN

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