Define routine parameters

When the routine manager invokes a C UDR, the routine manager passes to the UDR any argument values that the calling SQL statement provided. When you write a C UDR, you can define routine parameters that indicate the data types of the arguments that you expect the UDR to handle.

This section provides information about how to define routine parameters for the following UDR arguments:
  • MI_DATUM argument
  • MI_FPARAM argument, which the routine manager passes in to every UDR
Tip: Routine arguments are optional; however, if your UDR does not require arguments, you must still declare an MI_FPARAM parameter in the C-function declaration. For more information, see The MI_FPARAM argument.

The routine manager uses the parameter data types in routine resolution. Therefore, you can have multiple UDRs with the same name, provided that their parameter lists uniquely identify the UDRs. For more information, see Routine resolution.