Domains

    You can use domains anywhere corresponding base type can be used, for example:

    • Create a column of a domain type
    • Use it as an index if a base type can be used as an index
    • Call functions with values of domain column
    • Explicit column type name in or DESCRIBE TABLE
    • Output to human-friendly format for SELECT domain_column FROM domain_table
    • Loading data from an external source in the human-friendly format:

    Limitations

    • Can’t convert index column of base type to domain type via ALTER TABLE.
    • Domain adds no constrains on stored values.