pragma restrict_references troubles

From: Adam Hapworth <hap_at_mikomi.org>
Date: 27 Dec 2001 06:08:30 -0800
Message-ID: <a6cb04db.0112270608.2b5cdcb5_at_posting.google.com>


I am having trouble figuring out what I am doing wrong with the pragma restrict_references in my package. I built it in oracle 8 which no longer handles pragmas in the way 7 does, but I need to move it to 7. I have a package with a number of functions and also some private functions which the other functions call. here is a bit of my package:

CREATE OR REPLACE PACKAGE holiday
IS

   FUNCTION check_date (d_date_in IN DATE) RETURN number;    pragma restrict_references(check_date, WNDS, WNPS); end holiday;

create or replace package body holiday
is
--Private function
 FUNCTION find_date (d_date_in IN DATE, v_operator IN VARCHAR2) RETURN DATE

  • Using a cursor in here to do a select. **CODE** end find_date;

   FUNCTION check_date (d_date_in IN DATE) RETURN NUMBER    IS
   BEGIN

      IF d_date_in = find_date(d_date_in,'=') THEN 
	 RETURN 1;
      ELSE
	 RETURN 0;
      END IF;

   END check_date;    

end holiday

When I compile this I get this error:
0/0 PL/SQL: Compilation unit analysis terminated 142/4 PLS-00452: Subprogram 'CHECK_DATE' violates its associated pragma

I don't understand how this is violating the pragmas that I have set. Even droping down to WNDS dosen't help.

If that was not enough information take a look at http:\\www.mikomi.org\~hap\sql\holiday_package.sql

Thanks for you time
Adam Received on Thu Dec 27 2001 - 15:08:30 CET

Original text of this message