Type Definitions

type_definition:
   CREATE TYPE [ schema_name '.' ] type_name  EXTERNAL NAME  MAL_type_name

drop_type:
   DROP   TYPE [ schema_name '.' ] type_name [ RESTRICT | CASCADE ]

Declare a new user-defined data type. The type_name must be unique within the schema.
The type implementation (structure, operators & functions both scalar and bulk) must be specified externally in C code and MAL script.
For examples see the C implementations of data types: blob, inet, json, url, uuid and xml and SQL script code for json type.

See also the MAL Type System.

Note: These statements are MonetDB specific. EXTERNAL implies language MAL.

Associated system table: sys.types