X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1FE84537BF for ; Fri, 13 May 2005 18:35:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26367-02 for ; Fri, 13 May 2005 21:35:06 +0000 (GMT) Received: from mr2.surnet.cl (smtp2.surnet.cl [216.155.73.163]) by svr1.postgresql.org (Postfix) with ESMTP id 3A25D537A0 for ; Fri, 13 May 2005 18:35:05 -0300 (ADT) Received: from smtp2.surnet.cl (216.155.73.169) by mr2.surnet.cl (7.0.031.3) id 4259ADFA00729CE2; Fri, 13 May 2005 17:35:41 -0400 Received: from smtp1.surnet.cl (smtp1.surnet.cl []) by mr2.surnet.cl ([216.155.73.169]); Fri, 13 May 2005 21:35:41 +0000 Received: from cluster.surnet.cl (216.155.73.164) by smtp1.surnet.cl (7.0.031.3) id 42587C6E005EC155; Fri, 13 May 2005 17:34:36 -0400 Received: from localhost (200.85.220.212) by cluster.surnet.cl (7.0.024) id 4276578F001A70D9; Fri, 13 May 2005 17:35:04 -0400 Received: by localhost (Postfix, from userid 1000) id C40E1C32DDE; Fri, 13 May 2005 17:35:05 -0400 (CLT) Date: Fri, 13 May 2005 17:35:05 -0400 From: Alvaro Herrera To: "Harris, Richard" Cc: pgsql-admin@postgresql.org Subject: Re: Permissions not removed when group dropped Message-ID: <20050513213505.GB17830@surnet.cl> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.182 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO, RCVD_IN_NJABL_PROXY X-Spam-Level: ** X-Archive-Number: 200505/195 X-Sequence-Number: 17624 On Fri, May 13, 2005 at 03:43:54PM -0500, Harris, Richard wrote: Hi, > I'm using PostgreSQL 8.0. I created a group called grpA and granted grpA > 'SELECT' permission on view viewA. When I dropped grpA and created group > grpB, group grpB 'automatically' has SELECT permission to viewA. After > dropping a group with permission to a view, I see that the permission > stored in the relacl field fo pg_class is changed from the group name to > the sysid of the dropped group. When a new group is created, it gets a > sysid that is one greater than the largest of the sysid (e.g., the sysid > of the last group dropped). Thus the new group may 'inherit' the > permissions of a dropped group. > > I have not found this behavior documented any where. Is this behavior > intended? What do I need to do so that when I drop a group all the > permissions of the group are also 'dropped' (i.e., cleared from the > relacl field)? This is a known limitation. You have to remove the group from all ACLs before dropping the group; OTOH you can specify a SYSID when creating a group. We are working on it, and hopefully in 8.1 you will be told where the user/group is referenced if you try to drop it. Automatically deleting the references from all ACLs has not been discussed but it's a possible outcome of the implementation. -- Alvaro Herrera () "And as an added bonus, now my computer goes to the toilet for me, leaving me free to spend time on more useful activities! yay slug codefests!" (C. Parker)