The routine manager
After the query parser has used routine resolution to determine which UDR to invoke, the query executor calls the routine manager to handle the UDR execution.
The routine manager performs the following steps to execute the
C UDR:
- For each UDR instance:
- Load the shared-object file that contains the object code for the UDR into shared memory.
- Allocate and initialize the routine sequence for the UDR.
- For each invocation of the UDR:
- Push the UDR argument values onto the thread stack.
- Dispatch the UDR to the appropriate virtual-processor class for execution.
- Save the return value of a user-defined function on the thread stack.
- At the end of the UDR instance, release the routine sequence.
The following sections briefly describe each of these steps. For a general discussion of the routine manager, see the Informix® User-Defined Routines and Data Types Developer's Guide.