PG-9.3.6, unable to "drop role because some objects depend on it"

From: Dennis Jenkins <dennis(dot)jenkins(dot)75(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: PG-9.3.6, unable to "drop role because some objects depend on it"
Date: 2015-04-13 17:05:40
Message-ID: CAAEzAp8mA7fMt05ZkNVX37tn+aA=yD3TbikHR7o3XrekO9EbNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am attempting to remove a "role" from Postgresql-9.3.6. I've already
reassigned ownership for the role's tables, functions, sequences, types,
views, etc... However, I am still unable to remove the role. Postgresql
reports that "8 objects in the database 'postgres'" depend on this role.

How do I locate the database objects that depend on the 'DEADUSER' so that
I can remedy the situation?

ps- I've tried "REASSIGN OWNED BY DEADUSER TO pgsql;" with no success.

(env vars set for PGDATABASE and PGUSER, target role name changed to
protect the guilty)

# psql -c"drop role DEADUSER;"
ERROR: role "DEADUSER" cannot be dropped because some objects depend on it
DETAIL: 8 objects in database postgres

# pg_dump --schema-only postgres | grep -i DEADUSER
## No results

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-04-13 17:06:05 Re: Re: Hot standby problems: consistent state not reached, no connection to master server.
Previous Message Ilya Ashchepkov 2015-04-13 16:42:03 Re: Hot standby problems: consistent state not reached, no connection to master server.