Re: - Mailing list pgsql-general

From Tom Lane
Subject Re:
Date
Msg-id 4103977.1637620513@sss.pgh.pa.us
Whole thread Raw
In response to  (AC Gomez <antklc@gmail.com>)
List pgsql-general
AC Gomez <antklc@gmail.com> writes:
> REASSIGN OWNED BY old_role TO masteruser;
> DROP OWNED BY old_role;
> DROP USER old_role;

> The consensus online is that these are the steps to be taken to
> successfully remove roles, yet we get this error below:
> ERROR:  role "old_role" cannot be dropped because some objects depend on it
> DETAIL: privileges for database the_database 96 objects in database
> the_database SQL state: 2BP01

> What is it that we could be missing here?

You need to do the REASSIGN OWNED and DROP OWNED steps in each
database of the cluster that old_role has any objects/privileges in.

You might need a manual revoke on "the_database" too; I'm not sure
if DROP OWNED does anything about DB-level privileges.

            regards, tom lane



pgsql-general by date:

Previous
From: AC Gomez
Date:
Subject:
Next
From: Shaozhong SHI
Date:
Subject: Why swirling circles in pgAdmin?