Oracle 10G native Compile Warngings ?

orca777

Member³
Hi DevTeam,
do you support the native PL/SQL - Compiler Warnings/Levels of Oracle 10G?
Now 'only' the PL/SQL-Developer warnings are shown

Greetings
Karl
 
Enabling compile time warnings at the session or system level, the warnings work for me in the program window, but are not there in the command window.

This procedure from oracle-base.com:
ALTER SESSION SET PLSQL_WARNINGS='ENABLE:ALL';

CREATE OR REPLACE PROCEDURE test_warnings AS
l_dummy VARCHAR2(10) := '1';
BEGIN
IF 1=1 THEN
SELECT '2'
INTO l_dummy
FROM dual;
ELSE
RAISE_APPLICATION_ERROR(-20000, 'l_dummy != 1!');
END IF;
END;
/

says "Procedure created" in PSD command window.
But says "SP2-0804: Procedure created with compilation warnings" in SQL*Plus.

The same procedure shows the "Error: PLW-06002: Unreachable code" in PSD's program window.

Thought you might want to know about the inconsistency.
 
How do you enable compile time warnings in PLD?

Can you do it at session level, i.e. for one particular program window or must it be done at system level?
 
It can be done at the Oracle system level, or you can limit it to the PL/SQL Developer system level by adding the alter session command in the AfterConnect.sql script in the PL/SQL Developer directory.
 
Back
Top