Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: simple pl/sql function question ?
Tlcbus wrote:
> I wrote a simple pl/sql function to decode a location field(this
> function does not access any table). When I tried to execute the
> function I got following error message.
>
> ora 06571 "Function%s does not guarantee not to update database"
>
> What do I have to do to calls with the pragma ?
If the function does not affect db integrity at all, then the following will do the trick (You don't need to do this for unpackaged functions):
CREATE OR REPLACE PACKAGE test AS
FUNCTION test1 ( param1 IN NUMBER);
PRAGMA RESTRICT_REFERENCES ( test1, WNDS,WNPS,RNDS,RNPS );
END;
/
You can find out more about doing this in the Oracle Server Application Developers Guide (Using Procedures and Packages Chapter) Received on Fri Oct 24 1997 - 00:00:00 CDT