Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 848B8632FEB for ; Tue, 10 Aug 2010 17:00:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 24014-10 for ; Tue, 10 Aug 2010 20:00:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 18E2E632C10 for ; Tue, 10 Aug 2010 17:00:36 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 10 Aug 2010 15:00:35 -0500 Message-Id: <4C61698D0200002500034469@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 10 Aug 2010 15:00:29 -0500 From: "Kevin Grittner" To: "Kasia Tuszynska" , "Szymon Guz" Cc: "pgsql-admin@postgresql.org" Subject: Re: postgres function does not handle PUBLIC - expected? References: <232B5217AD58584C87019E8933556D110211D1AE9F@redmx2.esri.com> <232B5217AD58584C87019E8933556D110211D1AEDA@redmx2.esri.com> <4C6164E50200002500034463@gw.wicourts.gov> <232B5217AD58584C87019E8933556D110211D1AF24@redmx2.esri.com> In-Reply-To: <232B5217AD58584C87019E8933556D110211D1AF24@redmx2.esri.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.51 tagged_above=-10 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201008/78 X-Sequence-Number: 35327 Kasia Tuszynska 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