SYSXTDTYPES

The sysxtdtypes system catalog table has an entry for each UDT (user-defined data type), including opaque and distinct data types and complex data types (named ROW types, unnamed ROW types, and COLLECTION types), that is defined in the database.

The sysxtdtypes table has the following columns.
Table 1. SYSXTDTYPES table column descriptions

Column Type Explanation
extended_id SERIAL Unique identifying code for extended data type
domain CHAR(1) Code for the domain of the UDT
mode CHAR(1) Code classifying the UDT:
  • B = Base (opaque) type
  • C = Collection type or unnamed ROW type
  • D = Distinct type
  • R = Named ROW type
  • S = Reserved for internal use
  • T = Reserved for internal use
  • ' ' (blank) = Built-in type
owner VARCHAR(32) Name of the owner of the UDT
name VARCHAR(128) Name of the UDT
type SMALLINT Code classifying the UDT
source INTEGER The sysxtdtypes reference (for distinct types only)

Zero (0) indicates that a distinct UDT was created from a built-in data type.

maxlen INTEGER The maximum length for variable-length data types

Zero indicates a fixed-length UDT.

length INTEGER The length in bytes for fixed-length data types

Zero indicates a variable-length UDT.

byvalue CHAR(1) 'T' = UDT is passed by value

'F' = UDT is not passed by value

cannothash CHAR(1) 'T' = UDT is hashable by default hash function

'F' = UDT is not hashable by default function

align SMALLINT Alignment ( = 1, 2, 4, or 8) for this UDT
locator INTEGER Locator key for unnamed ROW type

Each extended data type is characterized by a unique identifier, called an extended identifier (extended_id), a data type identifier (type), and the length and description of the data type.

For distinct types created from built-in data types, the type column codes correspond to the value of the syscolumns.coltype column (indicating the source type) as listed on page SYSCOLUMNS, but incremented by the hexadecimal value 0x0000800. The file $ONEDB_HOME/incl/esql/sqltypes.h contains information about sysxtdtypes.type and syscolumns.coltype codes.

An index on the extended_id column allows only unique values. An index on the locator column allows duplicate values, as does a composite index on the name and owner columns. A composite index on the type and source columns also allows duplicate values.