IFX_REPLACE_MODULE Function
'On' or 1, authorization
to use this function is available only to the Database Server Administrator
(DBSA), and to users whom the DBSA has granted the EXTEND role. | Argument | Description | Restrictions | Syntax |
|---|---|---|---|
| new_module | Full pathname of the new shared-object file to replace the shared-object file that old_module specifies | The shared-object file must exist with the specified pathname, which can be no more than 255 bytes long | Quoted String |
| old_module | Full pathname of the shared-object file to replace with the shared-object file that new_module specifies | The shared-object file must exist with the specified pathname, which can be no more than 255 bytes long | Quoted String |
- Zero (
0) to indicate success - A negative integer to indicate an error.
After IFX_REPLACE_MODULE completes execution, the database server ages out the old_module shared-object file; that is, all statements subsequent to the IFX_REPLACE_MODULE function will use UDRs in the new_module shared-object file, and the old module will be unloaded when any statements that were using it are complete. Thus, for a brief time, both the old_module and the new_module shared-object files could be resident in memory. If this aging out behavior is undesirable, use the IFX_UNLOAD_MODULE function to unload the shared-object file completely.
EXECUTE FUNCTION ifx_replace_module(
"/usr/apps/opaque_types/circle.so",
"/usr/apps/shared_libs/circle.so", "C"); EXECUTE FUNCTION ifx_replace_module(
"C:\usr\apps\opaque_types\circle.dll",
"C:\usr\apps\DLLs\circle.dll", "C"); To execute the IFX_REPLACE_MODULE function in applications, you must associate the function with a cursor.
For more information on how to use IFX_REPLACE_MODULE to replace a shared-object file, see the chapter on how to design a UDR in HCL® Informix® User-Defined Routines and Data Types Developer's Guide. For information on how to use the IFX_UNLOAD_MODULE function, see the section ids_sqs_1803.html#ids_sqs_1803.