Call a UDR directly (Server)

From within a C UDR, you can directly call another C function when the following conditions are met:
  • At compile time, you know the name of the C function that you want to call.
  • The C function is in the same shared-object file as the calling UDR.
This C function can be a registered UDR. In the following figure, assume that the func2() and func3() functions were registered as user-defined functions with the CREATE FUNCTION statement. The func3() user-defined function can directly call the func2() UDR because func3() and func2() are in the same shared-object file, source1.so.
Figure 1. Calling a UDR directly from another UDR
begin figure description - This figure is described in the surrounding text. - end figure description

If the UDR that you want to call is an overloaded routine, the database server executes the version of the UDR that is in the same shared-object file. This UDR does not get parameter casting or a default MI_FPARAM structure. If no version of this UDR exists in the same shared-object file, you receive a runtime error. To execute UDRs in other shared-object files, use the Fastpath interface.