Home | Previous Page | Next Page   Database Access > Executing User-Defined Routines > Calling UDRs Within a DataBlade API Module >

Calling a UDR Directly (Server)

From within a C UDR, you can directly call another C function when the following conditions are met:

This C function can be a registered UDR. In Figure 49, 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( ) reside in the same shared-object file, source1.so.

Figure 49. 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 resides in the same shared-object file. This UDR gets neither parameter casting nor 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.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]