| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with PRAGMA RESTRICT_REFERENCES!!!
In article <3640B83F.544639EC_at_gtri.gatech.edu>, Raj Vuchatu <raj.vuchatu_at_gtri.gatech.edu> wrote:
>I have defined a funtion( as seen below) in my package spec.
>
>PACAKGE xyz IS...
>..........
>
>FUNCTION correctedHours( pHr IN NUMBER, pDate IN DATE, pHrMon IN
>VARCHAR2 )
> RETURN NUMBER;
>
>
> PRAGMA RESTRICT_REFERENCES (correctedHours, WNDS, WNPS, RNDS, RNPS);
>....................
>
>In my package body, I implemented this function. I tried to use this
>function in a cursor declaration in a procedure of the package body. But
>I get an error as shown below when I tried to compile it:
>
>PLS-00452: Subprogram 'CORRECTEDHOURS' violates its associateed pragma
>PL/SQL: Compilation unit analysis terminated
>
<snip>
Does your package XYZ have initialization code? If it does and that code is "less pure" than the correctedHours function, remove those assertions (e.g. RNDS) from the function's PRAGMA that the initialization code cannot assert.
G.
![]() |
![]() |