External C/C++ user-defined functions have some restrictions.
Write all UDFs in a manner that allows them to be called simultaneously by different users while receiving different context functions.
If a UDF accesses a global or shared data structure, the UDF definition must implement the appropriate locking around its accesses to that data, including the releasing of that locking under all normal code paths and all error handling situations.
UDFs implemented in C++ may provide overloaded "new" operators for their classes, but they should never overload the global "new" operator. On some platforms, the effect of doing so is not limited to the code defined within that specific library.
Write all aggregate UDFs and all deterministic scalar UDFs such that the receipt of the same input values always produces the same output values. Any scalar function for which this is not true must be declared as NONDETERMINISTIC to avoid the potential for incorrect answers.
Users can create a standard SQL function without a DBA authority, but they cannot create a function which will invoke an external library without having DBA permissions. Attempting to do this results in an error message "You do not have permission to use the create function statement."