IntermediateAdvanced PostgreSQL

Theory: Roles vs Users

The query

SQL
-- Q: What is the difference between a Role and a User in PostgreSQL?
-- A: Since PostgreSQL 8.1, there is no difference. Both are just "Roles".
-- The CREATE USER command is simply an alias for CREATE ROLE ... WITH LOGIN.
-- Roles without login privileges act as Groups.
Tested against PostgreSQL 16

Note

You can group users by granting roles to other roles: GRANT developer TO john;