Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pragma definition for PL/SQL Packages

Re: Pragma definition for PL/SQL Packages

From: Gerard M. Averill <gaverill_at_chsra.wisc.edu>
Date: 1998/03/17
Message-ID: <6emte9$10q0$1@news.doit.wisc.edu>#1/1

In article <350D9861.426DA5A5_at_snet.net>, Mark Rothstein <xxxmarkr_at_snet.net> wrote:
>I followed each of the functions declarations with its own pragma
>statement (even though it was the same statement in each case), e.g.
>
> FUNCTION func1(arg1 IN VARCHAR2, arg2 IN NUMBER) RETURN NUMBER;
> PRAGMA RESTRICT_REFERENCES(func1, WNDS, WNPS);
> FUNCTION func1(arg1 IN NUMBER, arg2 IN NUMBER) RETURN NUMBER;
> PRAGMA RESTRICT_REFERENCES(func1, WNDS, WNPS);
>

Does this really work? (that is, can you really use all versions of the overloaded function in SQL statements?) The Oracle documentation seems to say no (Oracle7 Server Application Developer's Guide):

"PL/SQL lets you overload packaged (but not standalone) functions. That is, you can use the same name for different functions if their formal parameters differ in number, order, or datatype family.

However, a RESTRICT_REFERENCES pragma can apply to only one function declaration. So, a pragma that references the name of overloaded functions always applies to the nearest foregoing function declaration."

Just wondering if anyone has _actually_ succeeded in doing this.

Gerard



Gerard M. Averill, Associate Researcher
CHSRA, University of Wisconsin - Madison GAverill_at_chsra.wisc.edu Received on Tue Mar 17 1998 - 00:00:00 CST

Original text of this message

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