Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DETERMINISTIC Function in Pkg
On Oct 3, 2:33 pm, "userjohn" <userj..._at_mailinator.com> wrote:
> "Michel Cadot" >
>
> > This is not a private subprogram.
> > Yes.
>
> thanks
> so what is the doc talking about here ? what is a "private subprogram" then
> ?
>
> | >> You cannot declare DETERMINISTIC a private subprogram (declared inside
> | >> another subprogram or inside a package body).
Maybe the following code with explain what a private subprogram is: ORA92> CREATE OR REPLACE PROCEDURE testproc AS
2 FUNCTION with_det_test(i in number) return number 3 deterministic 4 is 5 begin 6 return i; 7 end; 8 BEGIN 9 dbms_output.put_line(with_det_test(1));10 END;
Warning: Procedure created with compilation errors.
ORA92> show errors
Errors for PROCEDURE TESTPROC:
LINE/COL ERROR
2 FUNCTION with_det_test(i in number) return number 3 is 4 begin 5 return i; 6 end; 7 BEGIN 8 dbms_output.put_line(with_det_test(1));9 END;
Procedure created.
Cheers,
Anurag
Received on Wed Oct 03 2007 - 13:47:14 CDT
![]() |
![]() |