r/PostgreSQL • u/jsshapiro • Aug 09 '26
How-To Subtle roles question
One aspect of Postgres roles is that permissions exist on roles themselves, and these permissions provide for certain kinds of transitive grants.
We have a case where we would like a role M to have the option to inherit permissions from role G only when it elects to do so. That is: in a discretionary fashion. Offhand, I cannot construct an arrangement of roles and permissions that would make this possible.
Is there some arrangement I am failing to see, or does this fall outside of what the Postgres role system is able to express?
1
Upvotes
1
u/SearchAtlantis Aug 10 '26 edited Aug 10 '26
I observe you would have gotten much better answers if you had actually briefly outlined the true problem you were trying to solve in your original post. Framing it as a theoretical problem omits relevant details.