A role is an entity that can function as a user and/or as a group. A role WITH LOGIN
can be used as a user, i.e. you can log in with it. Any role can function as a group, including roles that you can also log in as. So "user" and "group" are essentially terms that indicate the intended usage of a role, there's no real distinction between them. Even in the PostgreSQL flavour of SQL the two are used more or less as synonyms. For example, the documentation on CREATE USER
says:
CREATE USER is now an alias for CREATE ROLE.
Granting all ... see the manual for GRANT
. You probably actually want to grant rights to ALL TABLES IN SCHEMA public
rather than all tables in the database.
Granting some rights ... same thing, but instead of GRANT ALL
use GRANT SELECT, INSERT
for example. Again, see the manual.
A role is a user, and/or a group. You can only grant to roles, because roles are all that there is.