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.