Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: function overloading and PRAGMA RESTRICT_REFERENCES
A copy of this was sent to wilcoxon_at_foshay.citilink.com (Steve Wilcoxon)
(if that email address didn't require changing)
On Mon, 02 Aug 1999 13:45:39 GMT, you wrote:
>How can you get the RESTRICT_REFERENCES pragma to work when using function
>overloading?
>
>I have a package with two functions named f_total_fees and "PRAGMA
>RESTRICT_REFERENCES( f_total_fees, WNDS, WNPS, RNPS )", but when I go
>to use the function in a view I get "ORA-06571: Function F_TOTAL_FEES
>does not guarantee not to update database".
>
>I tried adding a second identical RESTRICT_REFERENCES line but it had no
>effect. I tried including argument lists in the PRAGMA, but that generates
>errors.
>
>Any ideas?
>
>Thanks...
>
>PS. Please respond directly to me as I don't have time to read this
>newsgroup regularly.
do you have a small test case to reproduce? It works with the restricts_refernences 2 times:
SQL> create or replace package demo_pkg 2 as
3 function foo( x in date ) return varchar2; 4 pragma restrict_references( foo, wnds, wnps, rnps );5
5 function foo( x in number ) return varchar2; 6 pragma restrict_references( foo, wnds, wnps, rnps );7 end;
Package created.
SQL>
SQL> create or replace package body demo_pkg
2 as
3 function foo( x in date ) return varchar2 4 as 5 begin 6 return 'date function was called'; 7 end;
8 function foo( x in number ) return varchar2 9 as 10 begin 11 return 'number function was called'; 12 end;
Package body created.
SQL>
SQL> create or replace view v1 as select demo_pkg.foo(sysdate) str from dual;
View created.
SQL> select * from v1;
STR
SQL>
SQL> create or replace view v1 as select demo_pkg.foo(1) str from dual;
View created.
SQL> select * from v1;
STR
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Aug 02 1999 - 09:18:40 CDT
![]() |
![]() |