It is known that it will return the same value any time I call it within the same session and that if it is called by another user, with different session, it will give different value.
select package1.getusername() from dual;
WHERE UPPER(tab1.column1) = package1.getusername()
This should result in one execution of the function regardless of rows returned by the SQL.
WHERE UPPER(tab1.column1) =(SELECT package1.getusername() FROM DUAL)
This package is also used to get parameters from the context.But in SQL statements it would be better to reference the CONTEXT directly using SYS_CONTEXT.
WHERE UPPER(tab1.column1) = SYS_CONTEXT(<your_context>,<your attribute>)