Scalable Database Server, HiRDB Version 8 UAP Development Guide
4.3.3 Defining and deleting stored functions
(1) Defining stored functions
- When a stored function is created, an existing stored function may become invalid
An existing stored function becomes invalid under the following condition:
- A UAP has called a stored function that has the same name (same authorization identifier and same routine identifier) and the same number of parameters as the stored function to be created.
In this case, use ALTER ROUTINE to re-create the stored function that was invalidated.
- When a stored function is created, an existing stored procedure may become invalid
When a stored function is created, an existing stored procedure may become invalid. An existing stored procedure becomes invalid under the following condition:
- The stored procedure calls a stored procedure that has the same name (same authorization identifier and same routine identifier) and the same number of parameters as the stored function to be created.
In this case, use ALTER PROCEDURE or ALTER ROUTINE to re-create the stored procedure that was invalidated.
- When a stored function is created, an existing trigger may become invalid
When a stored function is created, an existing trigger may become invalid. An existing trigger becomes invalid under the following condition:
- The trigger calls a stored function that has the same name (same authorization identifier and same routine identifier) and the same number of parameters as the stored function to be created.
In this case, use ALTER TRIGGER or ALTER ROUTINE to re-create the trigger that was invalidated.
- A created stored function becomes invalid
A stored function may become invalid if it is created under the following circumstances:
- A plug-in is installed.
- A stored function that calls a function provided by the plug-in in step 1 is created.
- A plug-in that is different from the one that was installed in step 1 is installed.
If the plug-ins installed in steps 1 and 3 provide functions that have the same name and same number of parameters, the stored function that was created in step 2 becomes in valid when step 3 is executed.
In this case, use ALTER ROUTINE to re-create the stored function that was invalidated.
(2) Deleting stored functions
- When a stored function is deleted, another stored function may become invalid
An existing stored function becomes invalid under the following condition:
- A UAP has called a stored function that has the same name (same authorization identifier and same routine identifier) and the same number of parameters as the stored function to be deleted.
In this case, use ALTER ROUTINE to re-create the stored function that was invalidated.
- When a stored function is invalid, a stored procedure that has the same name may become invalid
An existing stored procedure becomes invalid under the following condition:
- A UAP has called a stored procedure that has the same name (same authorization identifier and same routine identifier) and the same number of parameters as the stored function to be created.
In this case, use ALTER PROCEDURE or ALTER ROUTINE to re-create the stored procedure that was invalidated.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.