Subject Re: [firebird-support] Strange validation error
Author Ann W. Harrison
Eyal wrote:
> I have the following domain:
>
> dom_input_code CHAR(1) CHECK (VALUE IN ('C', 'D'))
>
> I have a table with the input_code column that uses the domain as the
> data type. Neither the domain nor the table DDL forbid NULL in that
> column, ie. NULL should be allowed.
>

NULL is not either 'C' or 'D'. The behavior you describe is correct
and follows the standard. You'd see the same behavior if you put
the constraint on the column rather than the domain. If you want
to allow nulls, you must explicitly allow them in the constraint.

Regards,


Ann