postgres=#CREATE ROLE demorole1 WITH LOGIN ENCRYPTED PASSWORD 'password1';
CREATE ROLE username NOINHERIT LOGIN PASSWORD password;
CREATE ROLE role_name;
# sudo su - postgres
CREATE ROLE joe LOGIN INHERIT;
CREATE ROLE admin NOINHERIT;
CREATE ROLE wheel NOINHERIT;
GRANT admin TO joe;
GRANT wheel TO admin;
GRANT group_role TO role1, ... ;
REVOKE group_role FROM role1, ... ;
CREATE ROLE role_name with NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS;
CREATE ROLE <name> WITH <list of permissions>;
CREATE ROLE admin WITH CREATEDB CREATEROLE;
CREATE ROLE name [ WITH ADMIN role_name ]