The mi_funcarg_get_routine_id() function

The mi_funcarg_get_routine_id() function returns the routine identifier for the companion UDR of a cost or selectivity function.

Syntax

mi_integer mi_funcarg_get_routine_id(funcarg_ptr)
   MI_FUNCARG *funcarg_ptr;
funcarg_ptr
A pointer to the MI_FUNCARG structure that describes the companion UDR.
Valid in client LIBMI application? Valid in user-defined routine?
No Yes

Usage

The mi_funcarg_get_routine_id() function returns the routine identifier from the MI_FUNCARG structure that funcarg_ptr references. The MI_FUNCARG structure provides information about an argument of a companion UDR to its cost or selectivity function.
Tip: The DataBlade® API provides the mi_funcid data type to hold routine identifiers. The mi_funcid data type has the same structure as the mi_integer data type. However, this DataBlade® API function still assumes that routine identifiers are of type mi_integer.

Use the mi_funcarg_get_routine_id() function in a cost or selectivity function to obtain the routine identifier for the companion UDR.

Return values

>= 0
The routine identifier for the companion UDR.
MI_ERROR
The function was not successful.