The mi_funcarg_get_tabid() function

The mi_funcarg_get_tabid() function returns the table identifier for the column associated with the companion-UDR argument of a cost or selectivity function.

Syntax

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

Usage

The mi_funcarg_get_tabid() function returns the table identifier from the MI_FUNCARG structure that funcarg_ptr references. The MI_FUNCARG structure describes an argument of a companion UDR to its cost or selectivity function. Use the mi_funcarg_get_tabid() function only for companion-UDR arguments that are column values; that is, only arguments for which the mi_funcarg_get_argtype() function returns the MI_FUNCARG_COLUMN value. The table identifier identifies the table that contains the column associated with the funcarg_ptr companion-UDR argument. It is the value from the tabid column of the systables system catalog table.

Use the mi_funcarg_get_tabid() function in a cost or selectivity function to obtain the table identifier for the column with which an argument passed into the companion UDR is associated.

Return values

>= 0
The table identifier for the column associated with the companion-UDR argument.
MI_ERROR
The function was not successful.