I found the following in the Using SQL roles topic of the devguide:
"Within stored procedures and functions that contain SQL, the current role is on the authorization stack. Initially, inside a nested connection, the current role is set to that of the calling context."
I think this is only correct for procedures running with invoker's rights. For procedures running with definer's rights, no role is set initially, according to the CREATE PROCEDURE statement topic in the reference manual:
"When the procedure is first invoked, no role is set; even if the invoker has set a current role, the procedure running with definer's rights has no current role set initially."