0

I've a User role "joe" in postgresql 14 that should act as admin without having superuser role.

postgres=# \du+
                                                                        List of roles
   Role name    |                         Attributes                         |              Member of               |              Description               
----------------+------------------------------------------------------------+--------------------------------------+----------------------------------------
 joe         | Create role, Create DB, Bypass RLS                         | {pg_read_all_data,pg_write_all_data} | 

Now "joe" creates a new database and needs to grant following permissions to "alice":

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA PUBLIC TO alice;
WARNING:  no privileges were granted for "spatial_ref_sys"
WARNING:  no privileges were granted for "geography_columns"
WARNING:  no privileges were granted for "geometry_columns"

The problem here might be that the schema is owned by user "postgres" who installed postgis in template1.

Is it possible to give Joe permissions to grant all kind of privileges on every database on every user without making him a superuser even if the schema is not owned by him?

New contributor
toni is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

1

No, that is not possible: only the owner of an object (or somebody who got the privilege gragted WITH GRANT OPTION) can do that.

But this is not necessary: these three objects belong to the PostGIS extension, and you should leave them alone anyway. So simply ignore these warnings.

1
  • Thanks Laurenz!
    – toni
    Jun 24 at 7:07

Your Answer

toni is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.