Give default privileges to another SuperUser ?

From: celati Laurent <laurent(dot)celati(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Give default privileges to another SuperUser ?
Date: 2022-02-17 08:53:51
Message-ID: CAHByMH2o4J6OJtbmCVkaSORUnED7SuxpnXWKe38hJFyPgdiO6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Good morning,

I'm a superUser. I have defined different roles for several "simple" users.
They have rights for
read/select/use on any existing table. And also on any table that will be
generated in the future (DEFAULT PRIVILEGE).

Here is my method:

--FOR PUBLIC DIAGRAM
> GRANT USAGE ON SCHEMA public TO "user";
> GRANT SELECT ON ALL TABLES IN SCHEMA public TO "user";
> ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO "user";

--FOR OTHER XXX DIAGRAM
> GRANT USAGE ON SCHEMA XXXX TO "user";
> GRANT SELECT ON ALL TABLES IN SCHEMA XXX TO "user";
> ALTER DEFAULT PRIVILEGES IN SCHEMA XXX GRANT SELECT ON TABLES TO "user";

This procedure works well when I perform the table creation operation (when
I am "grantor").
However, when my SuperUser colleague tries to create a table on his side,
with his own superUser connection role, the table is indeed created but is
only
visible by those who have a superUser connection role: simple users do not
seem to be able, by default, to view, access new tables
created by my colleague.

Does a person know how to give privileges to a SuperUser role so that when
he creates a new table, whether in the public schema or another schema, the
table will be by default visible, 'selectable' by everyone (by the other
roles superUser AND all 'simple' user roles that they only have 'usage'
privileges on schemas, ''select' privileges on tables).
Hoping to have been rather clear.
Thank you so much.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carsten Klein 2022-02-17 09:25:37 Re: Strange results when casting string to double
Previous Message Thomas Kellerer 2022-02-17 08:41:16 Re: Strange results when casting string to double