pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Kasia Tuszynska <ktuszynska@esri.com>
To: Szymon Guz <mabewlun@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: postgres function does not handle PUBLIC - expected?
Date: Tue, 10 Aug 2010 15:00:29 -0500
Message-ID: <4C61698D0200002500034469@gw.wicourts.gov> (raw)
In-Reply-To: <232B5217AD58584C87019E8933556D110211D1AF24@redmx2.esri.com>
References: <232B5217AD58584C87019E8933556D110211D1AE9F@redmx2.esri.com>
	<AANLkTi=oeOFdmMsr515Npgk_qupNX2BdUY60UyOg7O+8@mail.gmail.com>
	<232B5217AD58584C87019E8933556D110211D1AEDA@redmx2.esri.com>
	<AANLkTim+biVOvQyntTfSy+H_z1M58TPrLZtF8TrHvcsu@mail.gmail.com>
	<4C6164E50200002500034463@gw.wicourts.gov>
	<232B5217AD58584C87019E8933556D110211D1AF24@redmx2.esri.com>

Kasia Tuszynska <ktuszynska@esri.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



view thread (13+ messages)  latest in thread

Message-ID: <4C61698D0200002500034469@gw.wicourts.gov>
Permalink:  ../4C61698D0200002500034469@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4C61698D0200002500034469@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, ktuszynska@esri.com, mabewlun@gmail.com
  Subject: Re: postgres function does not handle PUBLIC - expected?
  In-Reply-To: <4C61698D0200002500034469@gw.wicourts.gov>
  References: <232B5217AD58584C87019E8933556D110211D1AE9F@redmx2.esri.com> <AANLkTi=oeOFdmMsr515Npgk_qupNX2BdUY60UyOg7O+8@mail.gmail.com> <232B5217AD58584C87019E8933556D110211D1AEDA@redmx2.esri.com> <AANLkTim+biVOvQyntTfSy+H_z1M58TPrLZtF8TrHvcsu@mail.gmail.com> <4C6164E50200002500034463@gw.wicourts.gov> <232B5217AD58584C87019E8933556D110211D1AF24@redmx2.esri.com> <4C61698D0200002500034469@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox