On 24/03/17 08:50, Svein Erling Tysvær wrote:
> I would expect changing defaults for fields that didn't have a default
> when records were inserted and that haven't explicitly received any
> value since, to be something that isn't all too common. Normally, I
> would expect running an "update T set F1 = 'XYZ' where F1 is null"
> shortly before or after setting such a default (assuming this would set
> the value even if issued after setting the default), but this may be
> just me and/or Fb 2.5. Note that I never work against huge databases.

I'm in the same camp as SET, especially if one is now adding a 'NOT
NULL' constraint to a field that contains NULL values. If one is not
adding the 'NOT NULL' constraint, then *I* would expect those fields to
still return NULL even after adding a DEFAULT 'NEW' because that is
value to REPLACE the NULL when ADDING a new record. If this is not the
case now, then my understanding is wrong, but in my case adding the the
NOT NULL would go hand in hand and the old records HAVE to be populated
manually prior to adding it? If later you need change a default then it
is up to the business logic to decide if old records change to the new
default, and at this point it becomes even more important that the
'unset' fields can be identified from the 'old default' ones?

If your logic is now replacing the returned data with a different value
to that actually stored, then I would say THAT is a bug. If the stored
field is NULL then either the query should return that or contain the
logic to display it as something else, it should not be 'magic'
depending on some other settings?

-- 
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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to