Create an external-language routine
You can write a routine in an external language that the database server supports. After you create a routine, you register the routine with a CREATE FUNCTION or CREATE PROCEDURE statement.
The
CREATE FUNCTION and CREATE PROCEDURE statements specify the location
of the external routine, as follows:
- For C UDRs, the location is the full pathname of the shared-object module, qualified with the name of the C function that implements the function or procedure.
- For Java™ UDRs, location is the name of the .jar file, followed by the name of the Java™ class and the name of the method within that class, including its arguments.
For example, the following figure shows a CREATE FUNCTION
statement that registers a user-defined function called abs_eq() that
is written in C. The corresponding C function is in a shared-object
file called abs.bld.