Oracle
  Home arrow Oracle arrow Compile-Time Warnings for Oracle DB 10g
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 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: starstarstarstarstar / 2
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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
     

       

    ORACLE ARTICLES

    - Oracle's Turn to Play in the Sun
    - Implementing and Using Oracle`s Restore Poin...
    - 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...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT