Determine if a function is a negator function

Before you execute a Boolean user-defined function with the Fastpath interface, you might want to determine whether this function has a negator function. A negator function evaluates the Boolean NOT condition for its associated Boolean user-defined function. In many cases, a negator can be more efficient to execute than the actual Boolean user-defined function.

To determine whether a user-defined function has a negator function, pass its function descriptor to the mi_func_negator() function. This function determines whether the user-defined function associated with this function descriptor was registered with the NEGATOR routine modifier of the CREATE FUNCTION statement. If so, mi_func_negator() returns the name of the negator function (from the negator column of the sysprocedures system catalog table). If the negator is more efficient, you can use this function name to obtain a function descriptor for the negator function with a Fastpath function such as mi_routine_get().