pyqScriptDrop Procedure (On-Premises Database)

This topic describes the pyqScriptDrop procedure in an on-premises Oracle Database. The pyqScriptDrop procedure removes a user-defined Python function from the OML4Py script repository.

To drop a user-defined Python function, you must have the PYQADMIN database role.

Syntax

sys.pyqScriptDrop (
    V_NAME          VARCHAR2    IN
    V_GLOBAL        BOOLEAN     IN     DEFAULT
    V_SILENT        BOOLEAN     IN     DEFAULT)
Parameter Description
V_NAME

A name for the user-defined Python function in the OML4Py script repository.

V_GLOBAL

A BOOLEAN that specifies whether the user-defined Python function to drop is a global or a private user-defined Python function. The default value is FALSE, which indicates a private user-defined Python function. TRUE specifies that the user-defined Python function is public.

V_SILENT

A BOOLEAN that specifies whether to display an error message when sys.pyqScriptDrop encounters an error in dropping the specified user-defined Python function. The default value is FALSE.

Example 9-28 Using the sys.pyqScriptDrop Procedure

For the creation of the user-defined Python functions dropped in these examples, see Example 9-27.

This example drops the private user-defined Python function pyqFun2 from the script repository.

BEGIN
  sys.pyqScriptDrop('pyqFun2');
 END;
 /

This example drops the global user-defined Python function pyqFun2 from the script repository.

BEGIN
  sys.pyqScriptDrop('pyqFun2', TRUE);
 END;
 /