Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0745A650170 for ; Wed, 29 Oct 2008 12:52:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26424-04 for ; Wed, 29 Oct 2008 12:52:41 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 96EC064FD76 for ; Wed, 29 Oct 2008 12:51:48 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-101-5.bk7-dsl.surnet.cl [200.126.101.5]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m9TFu0KJ027188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Oct 2008 08:56:02 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9754947CBC; Wed, 29 Oct 2008 12:51:44 -0300 (CLST) Date: Wed, 29 Oct 2008 12:51:44 -0300 From: Alvaro Herrera To: Marc Fromm Cc: "pgsql-admin@postgresql.org" Subject: Re: drop role fails Message-ID: <20081029155144.GB4331@alvh.no-ip.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 29 Oct 2008 08:56:02 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/169 X-Sequence-Number: 30625 Marc Fromm wrote: > I need to drop a role/user but receive the message: > ERROR: role "ken" cannot be dropped because some objects depend on it > DETAIL: 1 objects in database css > 1 objects in database manuals > 1 objects in database cswe2 > > I checked the databases listed and the user/role ken is not associated with any items in the database, owner is always listed as postgres. Probably it has been granted permissions. Try DROP OWNED BY (which should revoke the permissions), maybe preceded by REASSIGN OWNED BY just to ensure you don't drop objects you wanted to keep ... -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.