GRANT the_role TO userB;

Then isue:
Code:
ALTER userB DEFAULT ROLE ALL;
-- All granted roles will be his default roles
or
Code:
ALTER userB DEFAULT ROLE the_role;
-- Only THE_ROLE will be his default role, all other roles will be non-default roles
or
Code:
ALTER userB DEFAULT ROLE the_role, another_role, ....;
-- Only the listed will be his default roles, all other roles will be non-default roles
or
Code:
ALTER userB DEFAULT ROLE ALL EXCEPT another_role;
--All roles except ANOTHER_ROLE will be his default roles; 
--ANOTHER_ROLE will be his non-default role