Skip site navigation (1) Skip section navigation (2)

Re: drop role fails

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Marc Fromm <Marc(dot)Fromm(at)wwu(dot)edu>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: drop role fails
Date: 2008-10-29 15:51:44
Message-ID: 20081029155144.GB4331@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-admin
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.

In response to

pgsql-admin by date

Next:From: Peter KoczanDate: 2008-10-29 17:07:03
Subject: SSL and md5 password?
Previous:From: Marc FrommDate: 2008-10-29 15:40:21
Subject: drop role fails

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group