PLS-00452: Subprogram Violates Its Associated Pragma - Undocumented Information

(Doc ID 376803.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version and later
Information in this document applies to any platform.
***Checked for relevance on 26-Jul-2013***


Although this error can be seen in a number of different scenarios, the following describes just one scenario where this error unexpectedly occurs.

This scenario is where a View is created based on a Table. The View also has an column definition that is the result of a function call within a package. This package has multiple procedures and/or functions and each are unrelated to the other but happen to exist within the same package. Each function/procedure within the package has a different "PRAGMA RESTRICT_REFERENCES" purity level.

This package builds and executes without error.

When a new packaged function is created that references the View, it results in the following error even though the purity level of the new packaged function matches that of the package function used in the View.

-------- -----------------------------------------------------------------
2/8      PLS-00452: Subprogram 'NEWFUNCTION' violates its associated pragma

For Example:

Sample Output:

SQL> show errors

-------- -----------------------------------------------------------------
2/8      PLS-00452: Subprogram 'NEWFUNCTION' violates its associated pragma


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms