Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Reading package constant causes PLS-00452: Subprogram '<name>' violates its associated pragma
The following simplied case demonstates how you may get PLS-00452:
Subprogram '<name>' violates its associated pragma, when I would not
have expected it.
There is a single package with constants and a package with body, containing a function.
CREATE OR REPLACE PACKAGE TEST_GLOB_CONST AS
Compiling PACKAGE BODY TEST_PURITY will fail with PLS-00452: Subprogram 'TEST' violates its associated pragma. This is because it reads a global constant from the package TEST_GLOB_CONST. If you uncomment the pragma in PACKAGE TEST_GLOB_CONST and compile all, that will succeed.
Hope this will help anyone else who is staring at function calls in stead of global constant references for a cause of PLS-00452. Maybe this is well-known to some, but I did not come across it in documentation.
Best regards,
Roel Schreurs
The Netherlands
Received on Wed Jun 01 2005 - 08:49:10 CDT
![]() |
![]() |