Re: Remaining 9.5 open items - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Remaining 9.5 open items
Date
Msg-id 20151204185215.GP3685@tamriel.snowman.net
Whole thread Raw
In response to Re: Remaining 9.5 open items  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Remaining 9.5 open items
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > I noticed in passing that the role removal documentation should really
> > also discuss shared objects (as the DROP OWNED BY reference page does).
>
> If you're speaking of section 20.4, that text is all my fault ... but
> I'm not clear on what you think needs to be added?  The first DROP OWNED
> BY will take care of any privileges on shared objects, so I didn't really
> think we need to burden the recipe with that detail.

Specifically this:

----
Once any valuable objects have been transferred to new owners, any
remaining objects owned by the role-to-be-dropped can be dropped with
the DROP OWNED command.  Again, this command can only access objects in
the current database, so it is necessary to run it in each database that
contains objects owned by the role.
----

Isn't quite right, as databases which are owned by the role you're
trying to get rid of won't be dropped.  The "Again," does pay it some
back-handed service but it felt to me like it'd be better if it was more
explicit about shared objects, which won't be dropped even if you do go
through and connect to each database and issue the command.  Perhaps
that's a bit excessive as, really, the only kinds of 'owned, shared'
objects currently are databases and maybe it's clear enough that you
have to manually drop databases owned by the role you are trying to
drop, if you don't reassign the ownership.  That's what I was referring
to, anyway.

Thanks!

Stephen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Remaining 9.5 open items
Next
From: Tom Lane
Date:
Subject: Re: Remaining 9.5 open items