Restrictions On Replacing UDFs That Implement Operations On UDTs
The following restrictions apply to replacing UDFs that implement operations on UDTs:
This means that the function name, parameter list, method entry point name within the EXTERNAL clause, and so on must all match.
If the function is currently set to EXECUTE NOT PROTECTED mode, then you must perform an ALTER FUNCTION statement to change the mode to EXECUTE PROTECTED before you can perform the REPLACE FUNCTION statement.
Unless all of these conditions have been met when you submit the REPLACE FUNCTION statement, the system returns an error to the requestor.
a DROP CAST (see “DROP CAST” on page 793)
b REPLACE FUNCTION
c CREATE CAST (see “CREATE CAST/ REPLACE CAST” on page 212)
You cannot use REPLACE FUNCTION by itself to perform this task. An attempt to replace a casting function directly using REPLACE FUNCTION aborts and returns an error to the requestor.