OptionalschemaSchema to create the domain in
OptionaldefaultOptional default value. Strings are single-quoted and escaped unless they look like a raw SQL expression (wrapped in the caller's own quoting is not performed automatically for anything other than plain strings).
OptionalcollationEmits COLLATE collation
OptionalnotEmits NOT NULL (mutually exclusive in intent with allowing NULL, but Postgres allows either)
OptionalchecksOne or more CHECK expressions, e.g. ['VALUE > 0'], each emitted as
CONSTRAINT name CHECK (expression) when a corresponding name is given,
or a bare CHECK (expression) otherwise.
Options for creating a PostgreSQL domain (
CREATE DOMAIN name AS base_type ...)