Subject Re: [Firebird-Architect] Extended field/domain DEFAULT usage
Author Jim Starkey
Dmitry Yemanov wrote:

>I always insisted that such DDL shouldn't be allowed at all. Only this
>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.

--

Jim Starkey
Netfrastructure, Inc.
978 526-1376