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

Re: postgres function does not handle PUBLIC - expected?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Kasia Tuszynska" <ktuszynska(at)esri(dot)com>, "Szymon Guz" <mabewlun(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: postgres function does not handle PUBLIC - expected?
Date: 2010-08-10 20:00:29
Message-ID: 4C61698D0200002500034469@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
Kasia Tuszynska <ktuszynska(at)esri(dot)com> wrote:
 
> We found this issue because we can grant privs to public on a
> table, but could not revoke them.
 
Odd.
 
test=# create table t1 (c1 int primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"t1_pkey" for table "t1"
CREATE TABLE
test=# grant insert on t1 to public;
GRANT
test=# revoke insert on t1 from public;
REVOKE
test=# revoke update on t1 from public;
REVOKE
 
> If I did not "know" that public was there how 
> would I check for it's existence on Postgres?
 
You would need to go to the documentation.  Unfortunately, we don't
mention it on this page:
 
http://www.postgresql.org/docs/current/static/role-membership.html
 
As Andre pointed out, you can get a reasonable explanation on the
page describing the GRANT statement.
 
-Kevin

In response to

Responses

pgsql-admin by date

Next:From: charlie derrDate: 2010-08-10 20:00:42
Subject: Re: postgres function does not handle PUBLIC - expected?
Previous:From: Szymon GuzDate: 2010-08-10 19:56:37
Subject: Re: postgres function does not handle PUBLIC - expected?

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