Subject Re: [firebird-support] Generic StoredProc for returning generator value
Author Paul Vinkenoog
Hi Mahesh,

> A generator generate values from -(2^64) to (2^64)-1.

This is an error in some docs. The value is a signed 64-bit integer,
and can therefore range from -(2^63) .. (2^63)-1

> This range of numbers can't be accomodated in INTEGER. U can use
> Numeric(18). It works fine. As for pitfalls, as of now I can see
> anything.

Except maybe that some 64-bit values need 19 positions. The range,
when written out, is:

-9,223,372,036,854,775,808 through 9,223,372,036,854,775,807

Internally, this is not a problem: an INT64 is used. Only if your app
- or your data access components - depend on the declared maximum
number of positions, you could run into trouble. But even then, this
would happen only if the generator values became really really big.


Greetings,
Paul Vinkenoog