How to set roles and users with correct permissions on Postgres?
The concept of groups &amp; users has largely been done away with in PostgreSQL, with the terms USER and GROUP may be interchangeably used with ROLE. See documentation.

Suffice to say that what you want to do is create your "group" role first like this:

CREATE ROLE devs NOLOGIN;


Then grant all desired permissions to devs. Now create the users with IN ROLE devs clause like this:

CREATE ROLE jsmith LOGIN INHERIT IN ROLE devs ENCRYPTED PASSWORD '...' ...;
CREATE ROLE sjones LOGIN INHERIT IN ROLE devs ENCRYPTED PASSWORD '...' ...;
...


This will allow "real" users to login &amp; inherit all the same permissions but no one can explicitly become devs (or the "group" role).