Subject RE: [firebird-support] Cast as Numeric without parenthesis
Author Svein Erling Tysvær
I would expect numbers in the range -2147483648 to +2147483647 to be accepted (the size of an integer), and then there’s a separate field for storing whether things are shifted to the left or right. I’ve no experience or theoretical knowledge confirming this, but your examples would fit such a description. Hence, I would guess NUMERIC to default to NUMERIC(9, 0).

I've confirmed that

SELECT CAST('2147483647' as numeric) FROM RDB$DATABASE
SELECT CAST('2147483647' as numeric(9,0) FROM RDB$DATABASE

both are accepted, whereas

SELECT CAST('2147483648' as numeric) FROM RDB$DATABASE
SELECT CAST('2147483648' as numeric(9,0) FROM RDB$DATABASE

are rejected.

HTH,
Set