I recently ran into a trigger BEFORE INSERT OR UPDATEon a table. In this trigger, the author relies on functions INSERTINGand UPDATING(both returns BOOLEAN) the package DBMS_STANDARDto determine whether the trigger was run before insertion or before the update.
For instance:
CREATE OR REPLACE TRIGGER CUSTOMER_TRIGGER
BEFORE INSERT OR UPDATE ON CUSTOMER
FOR EACH ROW
BEGIN
IF INSERTING THEN
END IF;
IF UPDATING THEN
END IF;
END;
Yes, I know that two separate triggers could be written to handle two events separately. This is not a question of this question.
After troubleshooting the problems received by these functions, we got the word (from Oracle Support) that "dbms_standard routines should not really be called by user programs." It's true?
, , ( RAISE_APPLICATION_ERROR COMMIT) PL/SQL.