X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A7DCF53A41 for ; Sun, 15 May 2005 18:49:00 -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 92156-06 for ; Sun, 15 May 2005 21:48:56 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 3C52353A1D for ; Sun, 15 May 2005 18:48:54 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j4FLmuP9003359; Sun, 15 May 2005 17:48:56 -0400 (EDT) To: Alvaro Herrera Cc: Hackers Subject: Re: [ADMIN] Permissions not removed when group dropped In-reply-to: <20050515214253.GA8391@surnet.cl> References: <20050513213505.GB17830@surnet.cl> <172.1116038893@sss.pgh.pa.us> <20050514053053.GA26186@surnet.cl> <3868.1116084743@sss.pgh.pa.us> <20050515214253.GA8391@surnet.cl> Comments: In-reply-to Alvaro Herrera message dated "Sun, 15 May 2005 17:42:53 -0400" Date: Sun, 15 May 2005 17:48:56 -0400 Message-ID: <3358.1116193736@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/1034 X-Sequence-Number: 67910 Alvaro Herrera writes: > Additionally we need to think what should happen if the user is the > grantor of some privilege. I think we should warn in RESTRICT mode, and > in CASCADE, revoke the privilege from the grantee. You mean "fail in RESTRICT mode", no? > Hmm. We could implement something like "DROP USER LOCALLY [CASCADE | > RESTRICT]", which would be a very misleading name for operations 2-4 > above. Additionally, if the user doesn't have references in other > databases, drop the user itself. (Note it's inconsistent.) I'd go for something more like "DROP OWNED OBJECTS", which'd be just the stuff internal to the current database (owned objects and ACL entries). You don't need to drop group memberships per-database. regards, tom lane