Re: dropuser error - Mailing list pgsql-admin

From Tom Lane
Subject Re: dropuser error
Date
Msg-id 1395876.1758058025@sss.pgh.pa.us
Whole thread Raw
In response to dropuser error  (Sam Stearns <sam.stearns@dat.com>)
Responses Re: dropuser error
List pgsql-admin
Sam Stearns <sam.stearns@dat.com> writes:
> I'm trying to drop a user but getting the following error:

> dropuser: error: removal of role "dalec" failed: ERROR:  role "dalec"
> cannot be dropped because some objects depend on it
> DETAIL:  262 objects in database csbtest

If the display looks like that rather than itemizing the objects,
it's because they are in a different database of the cluster.
You need to connect to the "csbtest" database and then you can
drop or reassign ownership of those objects.

(The subtext here is that users/roles are shared across the
whole cluster, but most object kinds are local to one database.
You can't "see" the details of objects in a different database
than the one you're connected to.  DROP USER knows that there
are some dependencies, but not much more.)

            regards, tom lane



pgsql-admin by date:

Previous
From: sami l
Date:
Subject: Re: dropuser error
Next
From: Naveen Kumar
Date:
Subject: Re: dropuser error