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: Shakespeare <whatsin_at_xs4all.nl>
Date: Thu, 4 Oct 2007 12:14:38 +0200
Message-ID: <4704bd18$0$234$e4fe514c@news.xs4all.nl>

"userjohn" <userjohn_at_mailinator.com> schreef in bericht news:13g7ipn104dlr11_at_corp.supernews.com...
> 10gR2 EE (10.2.0.3.0) /Solaris
>
> According to the doc re. DETERMINISTIC Clause
> http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5009.htm#sthref6486
>
>>> You cannot declare DETERMINISTIC a private subprogram (declared inside
>>> another subprogram or inside a package body).
>
>
> I have this in the BODY:
>
> FUNCTION with_det_test(i IN NUMBER) RETURN NUMBER
> DETERMINISTIC
> IS
> BEGIN
> dbms_output.put_line(i);
> RETURN i;
> END;
>
> And in SPEC:
>
> FUNCTION with_det_test(i IN NUMBER) RETURN NUMBER DETERMINISTIC ;
>
>
> Why am I not getting compile error ?
> so do I have a valid determ. function ?
>
> thanks
>

  1. It is deterministic: it will return the same value at anytime for the same parameter
  2. It's NOT private, because it is in the spec of your package.

Shakespeare Received on Thu Oct 04 2007 - 05:14:38 CDT

Original text of this message

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