The MI_DATUM arguments
When an SQL statement invokes a UDR, the statement can specify column values or expressions to pass to the UDR. The routine manager passes these argument values to a UDR as MI_DATUM values.
The data type of each argument determines the passing mechanism
that the routine manager uses for the argument value, as follows:
- Values of most data types cannot fit into an MI_DATUM structure. The routine manager passes these argument values by reference.
- Values of a few data types can fit into an MI_DATUM structure. The routine manager passes these argument values by value.
The passing mechanism that the routine manager uses for a particular argument determines how you must declare the corresponding parameter of the UDR. For more information about how the routine manager passes argument values to a C UDR, see The MI_DATUM data type and Push arguments onto the thread stack.