We have a database with some partitioned tables (main table by value, the children by reference). We have a query that includes a function call in the where clause.
Select bunch_of_columns, package.function(parameter) as column18
from table a, table b, table c, table d
where a.key = b.key
and b.otherkey = c.key (+)
and c.key = d.key
and many_other_conditions
and package.function(parameter) = 'N'
Normally this query runs under my_app_user. In TOAD and SQLPLUS I can run this query and it returns data under both my_app_user and schema_owner_user.
BUT ... in our "application" (a .net application that uses ODP.NET) the query works for the schema_owner_user and NOT for the my_app_user.
There are no errors returned or noted.
The function does a PK based query against a view (of a relatively small table).
I should note that there are polices involved to mask some data from some users ... but have not seen a difference with policies on and off.