Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 9i VPD Predicate Function

Re: Oracle 9i VPD Predicate Function

From: Chris McMahon <NOSPAM_cochrane68_at_hotmail.com>
Date: Fri, 03 Jun 2005 22:36:40 -0400
Message-ID: <Ss8oe.33731$Fv.3710@lakeread01>


HansF wrote:
> On Fri, 03 Jun 2005 20:54:30 -0400, Chris McMahon interested us by
> writing:
>
>

>>I've observed that the predicate function we wrote for the policy 
>>against a table is firing twice for each query against that table.  Is 
>>this normal behavior for VPD Predicate Functions?

>
>
> What is the situation? How did you observe this? Is there a possibility
> it is doing what you are asking it to do?
>
> (The amount of information you provide is roughly like: I notice my 1991
> Volvo makes a funny sound when I press on the accelerator - is this normal?)
>

My predicate function has a policy with the TEST table and its body looks something like this:

v_pred := ' EXISTS ( SELECT 0 FROM lookup WHERE username = ''test'' ) '; INSERT INTO test_log VALUES ( v_pred );
return v_pred;

The SQL statement I run looks like this:

SELECT * FROM test;

After which, the TEST_LOG table has two rows in it.

I can't see why two rows are showing up in the TEST_LOG table unless for some reason the predicate function is being called twice. And I don't have any other policies. Received on Fri Jun 03 2005 - 21:36:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US