Subject | Re: [firebird-support] Changing numeric domain precision and scale |
---|---|
Author | Ivan Prenosil |
Post date | 2007-03-08T16:12:05Z |
> Well, doing the ALTER for the numeric domain is beingFB tries to forbid changes that would make table unreadable.
> executed without any error messages, so, there is - apparently -
> a difference between modifying numerics and others.
E.g. casting VARCHAR(40) to VARCHAR(20) can cause exception,
so it is forbidden.
Casting NUMERIC(4,4) to NUMERIC(4,3) will just truncate data a bit,
but will not raise exception, so it is allowed.
But the algorithm is wrong anyway - it does allow changing
NUMERIC(4,2) field to NUMERIC(4,3), which CAN corrupt the db.
(try it with value 99.99)
Ivan
http://www.volny.cz/iprenosil/interbase/