Subject Re: [firebird-support] Firebird 2.5 - Alter table - drop default - bug or feature
Author Lester Caine
On 25/04/17 12:51, Maxi maxirobaina@... [firebird-support] wrote:
> I expect the value assigned by DEFAULT when I add the new field is
> still there.

There has been various discussions on this area ...

If you add 'NOT NULL' to an existing field, then you need to populate
the existing fields with a value in the absence of a default. In my book
the existing records start the update for adding a new field with simple
new null records, and FROM A GOOD PRACTICE VIEW I would expect to
populate these empty fields under my control, so the idea that adding
the 'DEFAULT' to a field THEN populates existing fields 'magically' is
wrong, and the way the 'magic' bit would work depends on the order you
process things anyway.

It's not a 'bug' but rather preference and I'm with SET that the process
should include a managed UPDATE rather than a magic one ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk