CREATE TYPE
The CREATE TYPE statement defines a user-defined data type at the current server.
The following types of user-defined data types can be defined:
- Array
A user-defined data type that is an ordinary array. The elements of an array type are based on one of the built-in data types. See CREATE TYPE (array).
- Distinct
A user-defined data type that shares a common representation with one of the built-in data types. Functions that cast between the user-defined distinct type and the source built-in data type are generated when the user-defined distinct type is created. Optionally, support for comparison operations to use with the user-defined distinct type can be generated when the user-defined distinct type is created. See CREATE TYPE (distinct).