What is the difference between CURRENT_IS_ROLE_ENABLED and SESSION_IS_ROLE_ENABLED
In Oracle 19c the DBMS_SESSION package state this:
IS_ROLE_ENABLED Function
This function determines if the named role is enabled for this session.
Note:
This function is deprecated starting in Oracle Database 19c. Use DBMS_SESSION.CURRENT_IS_ROLE_ENABLED
or DBMS_SESSION.SESSION_IS_ROLE_ENABLED
instead.
What are the differences between these two functions? When to use which one? The documentation does not really help here:
SESSION_IS_ROLE_ENABLED: This function determines if the named role is enabled for the login user session
CURRENT_IS_ROLE_ENABLED: This function determines if the named role is currently enabled.