Subject Re: [Firebird-Architect] Extended field/domain DEFAULT usage
Author Jim Starkey
Alexandre Benson Smith wrote:

>Or requiring that when inserting a not null field to a populated table
>it should have a default value, and that default value should be applied
>to the field.
>
>
>
>
I really don't like this kind of eroteric hocus pocus unless sanctioned
by the standard, and even then, not much.

If someone wants to add a not null field to a populated table, the order
of battle should be:

1. Add the field without NOT NULL
2. Update all records in the table assigning appropriate values to
the new field.
3. Alter the field to be NOT NULL

Performing ESP is almost never the solution. It is simpler all around
to make the guy handle the problem himself. In almost all cases, it is
nothing more than a single mass UPDATE statement.


--

Jim Starkey
Netfrastructure, Inc.
978 526-1376