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

Bug / shortcoming in has_*_privilege

From: Jim Nasby <jim(at)nasby(dot)net>
To: PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Bug / shortcoming in has_*_privilege
Date: 2010-06-10 21:54:43
Message-ID: 4399EF7A-9419-4F84-B51A-A55C5EFAC12A@nasby.net (view raw or flat)
Thread:
Lists: pgsql-hackers
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
--
Jim C. Nasby, Database Architect                   jim(at)nasby(dot)net
512.569.9461 (cell)                         http://jim.nasby.net



Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2010-06-10 21:58:06
Subject: Re: Idea for getting rid of VACUUM FREEZE on cold pages
Previous:From: Greg SmithDate: 2010-06-10 21:34:29
Subject: Re: fix use of posix_fadvise in xlog.c

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