Opaque-Type Modifier
Element | Description | Restrictions | Syntax |
---|---|---|---|
align_value | Byte boundary on which to align an opaque type that is passed to a user-defined routine. Default is 4 bytes. | Must be 1, 2, 4, or 8, depending on the C definition of the opaque data type and hardware and compiler used to build the object file for the data type | Literal Number |
length | Maximum length to allocate for instances of varying-length opaque types. Default is 2 kilobytes. | Must be a positive integer < 32 kilobytes. Do not specify for fixed-length data types. Values that exceed this length return errors. | Literal Number |
Modifiers can specify the following optional information for opaque
types:
- MAXLEN specifies the maximum length for varying-length types.
- CANNOTHASH specifies that the database server cannot use the built-in hash function on the opaque type.
- ALIGNMENT specifies the byte boundary on which the database server aligns the opaque type.
- PASSEDBYVALUE specifies that an opaque type that requires 4 bytes or fewer of storage is passed by value.
By default, opaque types are passed to user-defined routines by reference.