At the point in time that we evaluate the expression
   ? - small_number * 1000
the left side of the minus operation is unknown and the right side is int.

Which means we perform the operation as an int subtraction and fail when we see 
a value outside that range.

I'm sorry, but I don't see a reasonable fix for this. Changing H2 to use a wider datatype by default is going to pessimize all other operations which don't need the extra precision unnecessarily.

You are going to have use to use CAST to hint that you want the expression 
evaluated as BIGINT.

Since CAST is SQL-92 standard, I don't see a problem with this.

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to