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: DETERMINISTIC Function in Pkg

Re: DETERMINISTIC Function in Pkg

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Thu, 04 Oct 2007 13:53:03 +0200
Message-ID: <4704D41F.8020303@gmail.com>


Shakespeare schrieb:
> 1) It is deterministic: it will return the same value at anytime for the
> same parameter

Whether the function is deterministic - is irrelevant to compiler errors/warnings - Oracle can impossible check the logic of pl sql unit ( in general case of course) and validate, whether it is deterministic or not, it is completely responsibility of developer.

Session altered.

SQL> create or replace function dont_trustme(i number)

   2 return number
   3 deterministic
   4 is
   5 begin
   6 return to_number(to_char(sysdate - i,'sssss'));    7 end;
   8 /

Function created.

SQL> show error
No errors.
SQL> select dont_trustme(1) from dual

   2 /

DONT_TRUSTME(1)


           50022

SQL> select dont_trustme(1) from dual

   2 /

DONT_TRUSTME(1)


           50031

Best regards

Maxim Received on Thu Oct 04 2007 - 06:53:03 CDT

Original text of this message

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