| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Pragma definition for PL/SQL Packages
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
![]() |
![]() |