Re: Role Self-Administration - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: Role Self-Administration
Date
Msg-id 4153C5E6-FB16-4DB3-90DD-0FB3AD118246@enterprisedb.com
Whole thread Raw
In response to Re: Role Self-Administration  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Role Self-Administration  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers

> On Oct 7, 2021, at 7:43 AM, Stephen Frost <sfrost@snowman.net> wrote:
>
>> Assuming no concept of role ownership exists, but that DROP ROLE bob CASCADE is implemented in a spec compliant way,
ifthere is a role "bob" who owns various objects, what happens when DROP ROLE bob CASCADE is performed?  Do bob's
objectsget dropped, do they get orphaned, or do they get assigned to some other owner?  I would expect that they get
dropped,but I'd like to know what the spec says about it before going any further with this discussion.  
>
> While the spec does talk about roles and how they can own objects, such
> as schemas, the 'drop role statement' doesn't appear to say anything
> about what happens to the objects which that role owns (in any case
> of CASCADE, RESTRICT, or no drop behavior, is specified).

Hmmph.  I think it would be strange if all of the following were true:

1) DROP ROLE bob CASCADE drops all objects owned by bob
2) Roles can own other roles
3) DROP ROLE bob CASCADE never cascades to other roles

I'm assuming you see the inconsistency in that set of rules.  So, one of them must be wrong.  You've just replied that
thespec is mute on the subject of #1.  Is there any support in the spec for claiming that #2 is wrong? 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Role Self-Administration
Next
From: Bruce Momjian
Date:
Subject: Re: storing an explicit nonce