pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guyren Howe <guyren@gmail.com>
To: AC Gomez <antklc@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Backing out of privilege grants rabbit hole
Date: Thu, 2 Apr 2020 20:41:02 -0700
Message-ID: <8EC7DEE2-10DB-4A3B-AC1B-CEC3D4E01414@gmail.com> (raw)
In-Reply-To: <C4EC1CAB-62B2-458E-BF51-B187754AAF5B@gmail.com>
References: <CABtmK-gif5ThuF+h9GUJQi8O1_eAWvK7+aC4+h73utkW=Qp8XQ@mail.gmail.com>
	<C4EC1CAB-62B2-458E-BF51-B187754AAF5B@gmail.com>

More fully:

REASSIGN OWNED BY doomed_role TO successor_role;
DROP OWNED BY doomed_role;
-- repeat the above commands in each database of the cluster
DROP ROLE doomed_role;

> On Apr 2, 2020, at 20:37 , Guyren Howe <guyren@gmail.com> wrote:
> 
> https://www.postgresql.org/docs/12/sql-drop-owned.html <https://www.postgresql.org/docs/12/sql-drop-owned.html;
> 
>> On Apr 2, 2020, at 20:34 , AC Gomez <antklc@gmail.com <mailto:antklc@gmail.com>> wrote:
>> 
>> Do I understand correctly that if a role was assigned countless object privileges and you want to delete that role you have to sift through a myriad of privilege grants in what amounts to a time consuming trial and error exercise until you've got them all?
>> 
>> Or is there a single command that with just delete the role and do a blanket grant removal at the same time?
>> 

view thread (11+ messages)  latest in thread

Message-ID: <8EC7DEE2-10DB-4A3B-AC1B-CEC3D4E01414@gmail.com>
Permalink:  ../8EC7DEE2-10DB-4A3B-AC1B-CEC3D4E01414@gmail.com/
Also on:    postgresql.org/message-id/8EC7DEE2-10DB-4A3B-AC1B-CEC3D4E01414@gmail.com

 · 

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: guyren@gmail.com, antklc@gmail.com
  Subject: Re: Backing out of privilege grants rabbit hole
  In-Reply-To: <8EC7DEE2-10DB-4A3B-AC1B-CEC3D4E01414@gmail.com>
  References: <CABtmK-gif5ThuF+h9GUJQi8O1_eAWvK7+aC4+h73utkW=Qp8XQ@mail.gmail.com> <C4EC1CAB-62B2-458E-BF51-B187754AAF5B@gmail.com> <8EC7DEE2-10DB-4A3B-AC1B-CEC3D4E01414@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