Re: DROP ROLE prevented by dependency

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bulgrien, Kevin" <Kevin(dot)Bulgrien(at)GDSATCOM(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DROP ROLE prevented by dependency
Date: 2012-01-06 18:22:10
Message-ID: 18994.1325874130@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Bulgrien, Kevin" <Kevin(dot)Bulgrien(at)GDSATCOM(dot)com> writes:
> psql 8.3.16
> I've done some searching of mailing list, etc., but have either not searched
> the right way, or something. If anyone could throw a bone on this it would
> be appreciated. I have no idea what the procedure is for figuring out how
> to drop this role:

> DROP ROLE myuser;
> ERROR: role "myuser" cannot be dropped because some objects depend on it
> DETAIL: 1 objects in database postgres

Try the command while connected to the postgres database. It can't give
you more detail than that from where you are, for lack of visibility
into the other database's system catalogs.

Also, read up on DROP OWNED BY.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-01-06 18:41:13 Re: How PostgreSQL handles Binary Large Objects (LOB/BLOB): types BYTEA, OID/pg_largeobjects and DATALINK
Previous Message Stefan Keller 2012-01-06 18:13:58 How PostgreSQL handles Binary Large Objects (LOB/BLOB): types BYTEA, OID/pg_largeobjects and DATALINK