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: Anurag Varma <avoracle_at_gmail.com>
Date: Wed, 03 Oct 2007 11:47:14 -0700
Message-ID: <1191437234.998677.32920@k79g2000hse.googlegroups.com>


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;
 11 /

Warning: Procedure created with compilation errors.

ORA92> show errors
Errors for PROCEDURE TESTPROC:

LINE/COL ERROR




2/15 PLS-00712: illegal option for subprogram WITH_DET_TEST ORA92> CREATE OR REPLACE PROCEDURE testproc AS
  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;
 10 /

Procedure created.

Cheers,
Anurag Received on Wed Oct 03 2007 - 13:47:14 CDT

Original text of this message

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