05.05.2014 20:13, Jim Starkey wrote: >> AFAIR, int64 integers are not converted into double, they're compressed >> using their native format. > > If so, it's a bug. The purpose of the index encoding is that all > numbers have the same representation, based on actual value rather than > declaration. It also screws up big time when the scale factor changes.
I was incorrect, sorry. It's not compressed natively but instead taking the scale into account. The scaled int64 value is transformed into two parts: value (double) and additional scale factor (short) that are both compressed into a key. > If you declare an integer field as 64 bit, store some numbers, then > change either field scale factor or the field type to double, you index > lookups will fail. Changing from BIGINT to DOUBLE is prohibited, as well as increasing the scale. Decreasing the scale is allowed and should work fine, AFAIU. Dmitry ------------------------------------------------------------------------------ Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel