Subject | Re[4]: [firebird-support] GBak Backup & Restore Problem |
---|---|
Author | Helen Borrie |
Post date | 2013-06-25T21:33:34Z |
At 08:56 a.m. 26/06/2013, Dmitry Kuzmenko wrote:
Applying a NOT NULL constraint with a DEFAULT to a column does not magically "update" nulls that already exist in that column. A DEFAULT applies **only** to inserts and then **only** if the insert statement excludes that column from the input set.
Firebird 3 will disallow changing a column from nullable to NOT NULL if you do not fix the data manually beforehand.
Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__________________________________________________________________
>Tn> I will not repeat (ooops, I am already in the way !) that theThe gbak restore problem IS evidence that the source DB is not OK. This problem could have been lying unnoticed in that database for a long time, if you have never done a backup-and-restore on it until now.
>Tn> source DB (for the backup) is ok.
>
>currently no evidence that it is ok :-)
Applying a NOT NULL constraint with a DEFAULT to a column does not magically "update" nulls that already exist in that column. A DEFAULT applies **only** to inserts and then **only** if the insert statement excludes that column from the input set.
>Tn> We have FB 2.1.Actually, 2.1.5 and 2.1.5 Update 1 after that. ;-)
>
>this is misty. I know 5 versions of 2.1. 2.1.0, 2.1.1, 2.1.2...
>and all of them up to 2.1.4 have bugfixes.
Firebird 3 will disallow changing a column from nullable to NOT NULL if you do not fix the data manually beforehand.
Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"
http://www.firebird-books.net
__________________________________________________________________