From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Drop role cascade ?
Date: Thu, 17 Nov 2022 17:44:51 -0600
Message-ID: <165fba28-443f-c981-ba06-a996b8c81969@gmail.com> (raw)
In-Reply-To: <2058701.1668727016@sss.pgh.pa.us>
References: <CAEs=6D=z_1f_FNS6NxYOpS-M8HrrKLmSoM=UY3yA6dznOivt0Q@mail.gmail.com>
<2058701.1668727016@sss.pgh.pa.us>
On 11/17/22 17:16, Tom Lane wrote:
> David Gauthier <dfgpostgres@gmail.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.
SIMULATE and VERBOSE options would be handy, to see what those commands
would actually do.
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: Drop role cascade ?
In-Reply-To: <165fba28-443f-c981-ba06-a996b8c81969@gmail.com>
References: <CAEs=6D=z_1f_FNS6NxYOpS-M8HrrKLmSoM=UY3yA6dznOivt0Q@mail.gmail.com> <2058701.1668727016@sss.pgh.pa.us> <165fba28-443f-c981-ba06-a996b8c81969@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox