Re: dropping role w/dependent objects - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: dropping role w/dependent objects
Date
Msg-id 20070404223530.GG19251@alvh.no-ip.org
Whole thread Raw
In response to dropping role w/dependent objects  ("Ed L." <pgsql@bluepolka.net>)
Responses Re: dropping role w/dependent objects  ("Ed L." <pgsql@bluepolka.net>)
List pgsql-general
Ed L. wrote:
> This is pgsql 8.2.3:
>
> % psql -c "drop role mygroup"
> ERROR:  role "mygroup" cannot be dropped because some objects
> depend on it
> DETAIL:  227 objects in this database
>
> How do I identify what these dependent objects are?

Hum, this seems to be a bug.  The objects are supposed to be logged in
the DETAIL field of that error, but when the count is too high
apparently the detail is being clobbered and rewritten with a count
instead.  I would have expected that it listed some of those objects,
say the first 40.

Note that you can give the objects owned by that role to someone else
with REASSIGN OWNED, and drop the objects with DROP OWNED (note that
they act differently regarding grants; see the docs)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: dropping role w/dependent objects
Next
From: "Ed L."
Date:
Subject: Re: dropping role w/dependent objects