Re: Create multiple users, to have all privileges on each others objects/relations

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Create multiple users, to have all privileges on each others objects/relations
Date: 2020-11-15 20:30:22
Message-ID: CAKFQuwZdtU0FHxwNZD9wXEeozwEfrrw93Q1mveVHO2YUkVBuSw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sunday, November 15, 2020, Ron <ronljohnsonjr(at)gmail(dot)com> wrote:

> On 11/15/20 9:46 AM, otar shavadze wrote:
>
> How can create multi users so, that they all have permissions on each
> others DB objects ?
>
>
> ALTER DEFAULT PRIVILEGES FOR ROLE postgres_subuser1 GRANT ALL PRIVILEGES
> ON TABLES TO postgres_subuser1;
> ALTER DEFAULT PRIVILEGES FOR ROLE postgres_subuser2 GRANT ALL PRIVILEGES
> ON TABLES TO postgres_subuser2;
>
> Tell please, What is my mistake?
>
> You aren’t cross-authorizing: the context role and target role in each
command is the same role.

>
> Try creating a "group" role, and then "user" roles which inherit from the
> "group" role.
>
>
That is indeed the more common way of accomplishing the stated goal.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yambu 2020-11-16 17:50:40 Locks
Previous Message Ron 2020-11-15 16:16:21 Re: Create multiple users, to have all privileges on each others objects/relations