Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DETERMINISTIC Function in Pkg
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
![]() |
![]() |