Subject Re: [IBO] integer limit in FB
Author Helen Borrie
At 08:58 AM 23/12/2004 +0200, you wrote:

>Hi all,
>
>What is the integer limit in Firebird ?
>
>in Interbase
>
>select cast(99999999999 as integer) as id_xx
>
>worked.
>
>
>In FB the same query triggers an arithmetic exception.
>
>but
>
>select cast(999999999 as integer) as id_xx
>
>is OK .

I get cross-eyed counting all those 9s and I think you did, too. The first
number is an arithmetic overflow and Firebird is correct to reject
it. It's not sensible to cast an integer as an integer. IB has plenty of
quirks. It would be interesting to know what it did with your overflowing
number in the cast...

Type INTEGER or INT has a range from -2^31 to 2^31 - 1, or -2,147,483,648
to 2,147,483,647,

Type BigInt (or NUMERIC(18,0) has a range from -2^63 to 2^63 -1, or
-9223372036854775808 to 9223372036854775807.

>Can anybody send me some documentation about differences between IB and FB ?

No, it doesn't exist. But you can get the docs for IB6.0 and also the
release notes for Fb 1 and Fb 1.5. What's new in the release notes is how
Firebird changed since the IB 6.0 code was released.

As for later versions of InterBase - well, Borland doesn't give away its
docs so, if you have those IB versions, you will know more than those who
don't. :-))

Helen