Many PL/SQL developers are unaware of the STANDARD package, and its implications for their PL/SQL code. For example, it is common to find programmers who assume that names like INTEGER and TO_CHAR are reserved words in the PL/SQL language. That is not the case. They are, respectively, a datatype and a function declared in the STANDARD package. STANDARD is one of the two default packages of PL/SQL (the other is DBMS_STANDARD). Because STANDARD is a default package, you do not need to qualify references to datatypes like INTEGER, NUMBER, PLS_INTEGER, etc., with “STANDARD”—but you could, if you so desired. PLW-5004 notifies you if you happen to have declared an identifier with the same name as an element in STANDARD (or a SQL built-in; most built-ins—but not all—are declared in STANDARD). Consider this procedure definition: 1 CREATE OR REPLACE PROCEDURE plw5004 Compile-time warnings for this procedure will display as follows: LINE/COL ERROR You should avoid reusing the names of elements defined in the STANDARD package unless you have a very specific reason to do so.
blog comments powered by Disqus |