Skip to content

sql: support user-defined DOMAIN types #27796

@knz

Description

@knz

Special case of #25123.

A domain is essentially a data type with optional constraints (restrictions on the allowed set of values).

Example:

CREATE DOMAIN us_postal_code AS TEXT
CHECK(
   VALUE ~ '^\d{5}$'
OR VALUE ~ '^\d{5}-\d{4}$'
);

Jira issue: CRDB-4941

Epic CRDB-62146

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-datatypesSQL column types usable in table descriptors.A-sql-pgcompatSemantic compatibility with PostgreSQLA-tools-efcoreC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)X-anchored-telemetryThe issue number is anchored by telemetry references.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions