Re: Drop role cascade ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Gauthier <dfgpostgres(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Drop role cascade ?
Date: 2022-11-17 23:16:56
Message-ID: 2058701.1668727016@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Gauthier <dfgpostgres(at)gmail(dot)com> writes:
> Someone who had privileges in a lot of tables/schemas/DBs left the
> company. I want to drop that role but "rop role xxx" won't let me
> because... "xxx cannot be dropped because some objects depend on it".

> Is there a way to just get rid of this role without revoking xxx in all
> the individual DB objects he has privs too? Something like "drop role xxx
> cascade" ?

Not directly, but see REASSIGN OWNED and DROP OWNED.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2022-11-17 23:44:51 Re: Drop role cascade ?
Previous Message Adrian Klaver 2022-11-17 23:16:24 Re: Drop role cascade ?