24.03.2017 19:39, Alex Peshkoff wrote: > On 03/24/17 20:26, Vlad Khorsun wrote: >> 24.03.2017 17:57, Alex Peshkoff wrote: >>> On 03/24/17 17:53, Vlad Khorsun wrote: >>> >>>> So far we have no agreement on what is "correct result". Current >>>> implementation >>>> changed well known old behaviour not claiming it as a bug. I'd say it >>>> looks like >>>> a bug itself. >>> Vlad, looking at sql2008 (part2, foundation, 11.10 - alter table >>> statement) one can read in <add column definition> that when new column >>> is added, and this is base (not generated) column, and this is not >>> identity column then every value in this column is it's default value. >>> And it's mentioned in <alter column definition> <set column default >>> clause> that new default value is stored in column descriptor, but >>> nobody mentions that it should be changed for existing records. >>> >>> I.e. according to standard old (interbase origined) behavior was a bug >>> and current one is correct. >> >> I already show that info from standard but can't make same conclusion. >> I see it as not specified. > > Well, it's also not specified that rand() output should not be placed > into a column for which default value was changed :-)
I consider standard as document which we should read curefully and follow strictly. Such documents should be created in a such way to not allow ambiguity and describe every possible and not possible conditions. Unfortunately, this is not always true. As for rand() output - i already show example when value returned by known empty field with default can't be found at system dictionary. > What must be done is specified exactly. And we should suppose that in > all other aspects data stored in database should not be changed - What data is *stored* ? > without that addition any operation on database can randomly modify it > in unpredictable way. Sure. But not in our case ;) Regards, Vlad ------------------------------------------------------------------------------ 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