From: | Ron <ronljohnsonjr(at)gmail(dot)com> |
---|---|
To: | 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 16:16:21 |
Message-ID: | ff5dd1b5-03b1-8c24-7346-8c7d11248efa@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On 11/15/20 9:46 AM, otar shavadze wrote:
> Hello,
> How can create multi users so, that they all have permissions on each
> others DB objects ?
> What I did (From "postgres" user):
>
> CREATE ROLE postgres_subuser1 PASSWORD 'some_password';
> CREATE ROLE postgres_subuser2 PASSWORD 'some_password';
>
> 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;
>
>
> Then I logged in with "postgres_subuser1" and created table "table1".
> Then I logged in with "postgres_subuser2" and tried: "SELECT COUNT(*)
> FROM table1". This gives error: "|permission denied for table table1"
>
> |Tell please, What is my mistake?
Try creating a "group" role, and then "user" roles which inherit from the
"group" role.
--
Angular momentum makes the world go 'round.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-11-15 20:30:22 | Re: Create multiple users, to have all privileges on each others objects/relations |
Previous Message | otar shavadze | 2020-11-15 15:46:05 | Create multiple users, to have all privileges on each others objects/relations |