Subject | Re: [Firebird-Architect] Extended field/domain DEFAULT usage |
---|---|
Author | Thomas Steinmaurer |
Post date | 2006-01-05T18:30:27Z |
>>I always insisted that such DDL shouldn't be allowed at all. Only thisAnd only practical if there is DDL support for changing a non-null field
>>solution would cure everything. If we expect users to put some value in the
>>new column, then let them add it as nullable only and only after populating
>>it with values they could add a NOT NULL constraint. The same final effect
>>with 100% of reliability.
>>
>>
>>
>>
>
> Historically, I've argued against constraint evaluation at DDL time on
> the basis that any decent programmer is going to do that anyway. Ann
> has always argued in favor of constraint evaluation. I'm prepared to
> concede the point.
>
> We should define the contraint, validate it against existing data, and
> if it fails, back it out, all at DDL time. This means that adding a
> non-null field to a populated table will always fail, which I believe is
> the proper behavior.
to NOT NULL, otherwise it would mean, I won't be able to add a NOT NULL
field to an existing table at all.
Regards,
Thomas