Routine modifier

A routine modifier specifies characteristics of how a user-defined routine (UDR) behaves.

Syntax

(1)

1  %Adding or Modifying a Routine Modifier1
1 %Dropping a Routine Modifier
Dropping a Routine Modifier
23
2.2.1 ?  NOT VARIANT
2.1 NEGATOR
1 4
2.1 CLASS
2.1 ITERATOR
2.1 PARALLELIZABLE
1 2
2.1 HANDLESNULLS
2.1 INTERNAL
2.2.1 COSTFUNC
2.2.1 PERCALL_COST
2.2.1 SELFUNC
2.2.1 SELCONST
2.1 STACK
Notes:
Element Description Restrictions Syntax
parameter Name that you declare here for a returned parameter of the UDR Must be unique among returned parameters of UDRs. If any returned value of the UDR has a name, then all must have names. Identifier

Usage

If you drop an existing modifier in an ALTER FUNCTION, ALTER PROCEDURE, or ALTER ROUTINE statement, the database server sets the value of the modifier to the default value, if a default exists.

Some modifiers are available only with user-defined functions. For information about whether a specific routine modifier applies only to user-defined functions (that is, if it does not apply to user-defined procedures), see the description of the modifier in the sections that follow. In these sections, as elsewhere in this document, external refers to UDRs written in the C or Java™ languages. Features valid for only one language are so designated in the previous diagrams.

Except for VARIANT and NOT VARIANT modifiers, none of the options in this segment are valid for SPL routines.

Example

The following statement includes an external routine reference for a Java language UDR. You must first register demo_jar using the procedure install_jar(<absolute path><jar file name>,<internal registered name>).
CREATE FUNCTION delete_order(int) RETURNING int
   WITH (NOT VARIANT)
   EXTERNAL NAME 'informix.demo_jar:delete_order.delete_order()'
   LANGUAGE JAVA;