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: simple pl/sql function question ?

Re: simple pl/sql function question ?

From: Mark Styles <lambic_at_msn.com>
Date: 1997/10/24
Message-ID: <3450696B.6516@msn.com>#1/1

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

Original text of this message

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