Home |
Previous Page | Next Page Creating User-Defined Routines > Developing a User-Defined Routine >
The CREATE FUNCTION and CREATE PROCEDURE statements
register user-defined functions and user-defined procedures, respectively,
in the database. These functions store information about the UDR in
the sysprocedures system catalog table.
Registration for a C UDR requires the following special
clauses of the CREATE FUNCTION and CREATE PROCEDURE statements
to help the database server identify the routine:
- The required EXTERNAL NAME clause specifies
the path to the shared-object file that contains the compiled C
code for the UDR.
- The required LANGUAGE clause specifies
the language in which the body of the UDR is written.
- The optional WITH clause specifies
the routine modifiers for the UDR.
For example, Figure 64 shows a CREATE FUNCTION statement
that registers a user-defined function named abs_eq( ) whose
corresponding C function is in a shared-object file named abs.so.
Figure 64. Registering a C UDR
Tip:
The BladeSmith development tool, which is part of the DataBlade Developer's Kit,
automatically generates a file with the SQL statements needed
to register a DataBlade. The BladeManager development tool
can install and register a DataBlade module. For more information,
see the IBM Informix: DataBlade Developer's Kit User's Guide.
Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]