Should DBMS_STANDARD package procedures and / or functions be used in PL / SQL code?

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
    /* Some code */
  END IF;

  IF UPDATING THEN
    /* Some other code */
  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.

+5
1

INSERTING, UPDATING DELETING (. ), . , RAISE_APPLICATION_ERROR documented .

DESCribed DBMS_STANDARD, , , , , ( , ), GRANTEE.

, Oracle, , -, .

+9

All Articles