Obtaining the routine identifier
You can obtain the routine identifier for a strategy function directly from the qualification descriptor that the database server passes to the access method.
About this task
Call mi_qual_funcid(). Because the database server does not provide the routine identifier for a support function directly in a descriptor, use the following procedure to identify the support function for FastPath execution.
To obtain the routine identifier for a support function:
Procedure
- Use mi_tab_keydesc() to extract the key descriptor from the table descriptor.
- Use mi_key_opclass_nsupt() to determine the number of support functions that the access method must look up.
- Use mi_key_opclass_supt() to determine
each support-function name and then assemble a function prototype
with a statement similar to the following example:
sprintf(prototype, "%s(%s,%s)", function_name, key_data_type, key_data_type); - Use FastPath function mi_routine_get() to look up the function descriptor.