|
The mi_routine_get() function looks up a registered user-defined routine by routine signature that is a character string and returns its function descriptor.
The mi_routine_get() function creates a function descriptor for the UDR that the rout_sig argument specifies. The rout_sig argument specifies the routine signature of the UDR in the following format:
This function is one of the functions of the Fastpath interface. It is a constructor function for the function descriptor.
The mi_routine_get() function performs the following tasks:
The mi_routine_get() function allocates a new function descriptor in the PER_COMMAND memory duration.
The following call to mi_routine_get() looks for the a_udr() user-defined function in a database that is not ANSI compliant:
An ANSI database requires an owner name as part of a routine name. If a_udr() was defined in an ANSI-compliant database, you must include the owner name in the routine signature, as follows:
The udr_type is optional in the routine signature. As the preceding examples show, the udr_type defaults to function when it is omitted from the routine signature. If a user-defined procedure and a user-defined function have the same routine name, include the udr_type in the rout_sig signature. The following call to mi_routine_get() specifies that a_udr() is a user-defined function:
For user-defined procedures, specify the procedure keyword instead.
Other internal errors raise an exception.
See the descriptions of the following functions: mi_cast_get(), mi_fparam_get(), mi_routine_get_by_typeid(), mi_routine_exec(), and mi_routine_end().
For more information, see Calling UDRs with the Fastpath Interface.