Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Reading package constant causes PLS-00452: Subprogram '<name>' violates its associated pragma

Reading package constant causes PLS-00452: Subprogram '<name>' violates its associated pragma

From: <schreurs_roel_at_hotmail.com>
Date: 1 Jun 2005 06:49:10 -0700
Message-ID: <1117633750.711077.118990@g14g2000cwa.googlegroups.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US