Determining the authorization ID for invoking user-defined functions

The authorization ID under which a user-defined function is invoked depends on whether the function was invoked statically or dynamically.

If your user-defined function is invoked: The authorization ID under which the user-defined function is invoked is:
statically The owner of the package that contains the user-defined function invocation.
dynamically Dependent upon the value of bind parameter DYNAMICRULES for the package that contains the function invocation.
If the SQL statements in the user-defined function package execute: The authorization ID is:
statically The owner of the user-defined function package
dynamically dependent upon the value of DYNAMICRULES with which the user-defined function package was bound.

The DYNAMICRULES bind parameter influences a number of characteristics of an application program.