pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Gauthier <dfgpostgres@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Drop role cascade ?
Date: Thu, 17 Nov 2022 18:16:56 -0500
Message-ID: <2058701.1668727016@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEs=6D=z_1f_FNS6NxYOpS-M8HrrKLmSoM=UY3yA6dznOivt0Q@mail.gmail.com>
References: <CAEs=6D=z_1f_FNS6NxYOpS-M8HrrKLmSoM=UY3yA6dznOivt0Q@mail.gmail.com>

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.

			regards, tom lane





view thread (8+ messages)  latest in thread

Message-ID: <2058701.1668727016@sss.pgh.pa.us>
Permalink:  ../2058701.1668727016@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2058701.1668727016@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, dfgpostgres@gmail.com
  Subject: Re: Drop role cascade ?
  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>

* 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