Subject Re: [ib-support] Numeric, Decimal, Double Precision and Float data
Author Paul Reeves
Philippe Makowski wrote:
> And what about a field associated with a generator ?
> What kind of field to use INTEGER or NUMERIC(18,0) ?
>
Under dialect 1 NUMERIC(18,0) is stored as a double, so that rules it
out as a sensible datatype for a primary key. Under Dialect 3
NUMERIC(18,0) is stored as an int64. In fact the only way to currently
work with 64-bit integers is to use NUMERIC(18,0).

If a generator uses the integer datatype (instead of NUMERIC(18,0))
under Dialect 3 there is a possibility of the value wrapping. By my back
of the envelope calculations it should take about 6.8 years to wrap a
32-bit signed integer if the generator fires 10 times a second.


Paul
--

Paul Reeves
http://www.ibphoenix.com
Supporting users of Firebird and InterBase