Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D499A17A223 for ; Thu, 9 Feb 2012 19:23:12 -0400 (AST) Received: from smtp.01.com ([199.36.142.181]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RvdKX-0000He-6w for pgsql-docs@postgresql.org; Thu, 09 Feb 2012 23:23:10 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 35F6B3F505A for ; Thu, 9 Feb 2012 17:22:56 -0600 (CST) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vbt+6d0qw1ux for ; Thu, 9 Feb 2012 17:22:56 -0600 (CST) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 160083F4ED2 for ; Thu, 9 Feb 2012 17:22:56 -0600 (CST) Received: from Sidney-Stratton.local (70-36-143-92.dsl.dynamic.sonic.net [70.36.143.92]) by smtp-out-1.01.com (Postfix) with ESMTPSA id D03EE3F505A for ; Thu, 9 Feb 2012 17:22:55 -0600 (CST) Message-ID: <4F34554A.7040303@agliodbs.com> Date: Thu, 09 Feb 2012 15:22:50 -0800 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.24) Gecko/20111103 Lightning/1.0b2 Thunderbird/3.1.16 MIME-Version: 1.0 To: Pg Docs Subject: Add remark about column privileges to clarify X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/2 X-Sequence-Number: 7186 All, To avoid confusion, I think we should add the following sentence to http://www.postgresql.org/docs/current/static/sql-revoke.html: Current para: "Note that any particular role will have the sum of privileges granted directly to it, privileges granted to any role it is presently a member of, and privileges granted to PUBLIC. Thus, for example, revoking SELECT privilege from PUBLIC does not necessarily mean that all roles have lost SELECT privilege on the object: those who have it granted directly or via another role will still have it. Similarly, revoking SELECT from a user might not prevent that user from using SELECT if PUBLIC or another membership role still has SELECT rights." Suggested improvement: "Note that any particular role will have the sum of privileges granted directly to it, privileges granted to any role it is presently a member of, and privileges granted to PUBLIC. Thus, for example, revoking SELECT privilege from PUBLIC does not necessarily mean that all roles have lost SELECT privilege on the object: those who have it granted directly or via another role will still have it. Similarly, revoking SELECT from a user might not prevent that user from using SELECT if PUBLIC or another membership role still has SELECT rights. Similarly, if a role has been GRANTed privileges on an entire table, REVOKEing the same privileges from individual columns will have no effect." A quick poll of #postgresql revealed that most users, even folks who have been using Postgres for years, are unclear on how REVOKEing privileges on columns is supposed to work. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com