Oracle
  Home arrow Oracle arrow Compile-Time Warnings for Oracle DB 10...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Compile-Time Warnings for Oracle DB 10g
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2007-11-08

    Table of Contents:
  • Compile-Time Warnings for Oracle DB 10g
  • PLW-05001: previous use of 'string' (at line string) conflicts with this use
  • PLW-05004: identifier string is also declared in STANDARD or is a SQL built-in
  • PLW-05005: function string returns without value at line string

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Compile-Time Warnings for Oracle DB 10g
    (Page 1 of 4 )

    In this fourth part of a nine-part series on managing PL/SQL code, you will learn about the compile-time warnings that were introduced in Oracle Database 10g Release 1. This article is excerpted from chapter 20 of the book Oracle PL/SQL Programming, Fourth Edition, written by Steven Feuerstein and Bill Pribyl (O'Reilly; ISBN: 0596009771). Copyright © 2006 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

    Warnings Available in Oracle Database 10g

    In the following sections, let’s take a look at most of the compile-time warnings that were introduced in Oracle Database 10g Release 1. I will offer an example of the type of code that will elicit the warning and also point out some interesting behavior (where present) in the way that Oracle has implemented compile-time warnings.

    PLW-05000: mismatch in NOCOPY qualification between specification and body

    The NOCOPY compiler hint tells Oracle that, if possible, you would like it to not make a copy of your IN OUT arguments. This can improve the performance of programs that pass large data structures, such as collections or CLOBs.

    You need to include the NOCOPY hint in both the specification and the body of your program (relevant for packages and object types). If the hint is not present in both, Oracle will apply whatever is specified in the specification.

    Here is an example of code that will generate this warning:

      /* File on web: plw5000.sql */
      CREATE OR REPLACE PACKAGE plw5000
      IS 
         
    TYPE collection_t IS
           
    TABLE OF VARCHAR2 (100);

         PROCEDURE proc (
           
    collection_in IN OUT NOCOPY
              
    collection_t);
      END plw5000;
      /
      CREATE OR REPLACE PACKAGE BODY plw5000
      IS
        
    PROCEDURE proc (
           
    collection_in IN OUT
              
    collection_t)
            IS
            BEGIN
             
    DBMS_OUTPUT.PUT_LINE ('Hello!');
           
    END proc;
      END plw5000;
      /

    Compile-time warnings will display as follows:

      SQL> SHOW ERRORS PACKAGE BODY plw5000
      Errors for PACKAGE BODY PLW5000:

      LINE/COL ERROR
      -------- --------------------------------
      3/20     PLW-05000: mismatch in NOCOPY
               qualification between
               specification and body

      3/20     PLW-07203: parameter
               'COLLECTION_IN' may benefit
               from use of the NOCOPY
               compiler hint

    More Oracle Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Oracle PL/SQL Programming, Fourth...
     

    Buy this book now. This article is excerpted from chapter 20 of the book Oracle PL/SQL Programming, Fourth Edition, written by Steven Feuerstein and Bill Pribyl (O'Reilly; ISBN: 0596009771). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway