HI,If we can change the function's security dynamical, like : When function trigged in trigger or rule, force these function's security = table,mview,view's owner.There will no risks in the case.
PS: MySQL do that.