Adding or Modifying a Routine Modifier

Use this segment in the ALTER FUNCTION, ALTER PROCEDURE, or ALTER ROUTINE statement to add or modify values for routine modifiers of a UDR.

(1)
Adding or Modifying a Routine Modifier
12
2.2.1? ?  NOT VARIANT
2.1 NEGATOR = neg_func3
2.1 CLASS = class_name
2.1 ITERATOR
2.1 PARALLELIZABLE
2.1 1
2.2.2.1 HANDLESNULLS
2.2.1  INTERNAL
2.2.2.1 PERCALL_COST = 
2.2.2.2.1 cost
2.2.2.2.1!   0 
2.2.2.1 COSTFUNC = cost_func
2.2.2.1 SELFUNC = sel_func
2.2.2.1 SELCONST = selectivity
2.2.1 STACK = stack_size
Notes:
  • 1 C language
  • 2 Stored Procedure Language
  • 3 External routines only
Element Description Restrictions Syntax
class_name Virtual processor (VP) class in which to run the external routine Any C UDR must run in the CPU VP or in a user-defined VP class Quoted String.
cost CPU use cost for each invocation of a C-language UDR. Default is 0. Integer; 1 < cost < 231-1 (highest cost). Literal Number
cost_func Name of a companion user-defined cost function to run Must have same owner as the UDR. Execute privilege is needed to run. Identifier
neg_func Negator function that can be invoked instead of the UDR Must have same owner as the UDR. Execute privilege is needed to run. Identifier
sel_func Name of a companion user-defined selectivity function to invoke Must have same owner as the UDR. Execute privilege is needed to run. Identifier
selectivity CPU use cost for each invocation of a C-language UDR. Default is 0. See Concept of Selectivity. Literal Number
stack_size Size (in bytes) of stack of the thread that runs the C-language UDR Must be a positive integer Literal Number

You can add these modifiers in any order. If you list the same modifier more than once, the last setting overrides any previous values.