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: Problem with PRAGMA RESTRICT_REFERENCES!!!

Re: Problem with PRAGMA RESTRICT_REFERENCES!!!

From: Gerard M. Averill <gaverill_at_chsra.wisc.edu>
Date: Thu, 05 Nov 98 19:42:28 GMT
Message-ID: <71suul$12g2$3@news.doit.wisc.edu>


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.



Gerard M. Averill, Associate Researcher CHSRA, University of Wisconsin - Madison GAverill_at_chsra.wisc.edu Received on Thu Nov 05 1998 - 13:42:28 CST

Original text of this message

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