Neil Conway <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> This isn't a division problem --- the difficulty is there's no check for
>> overflow in int4 multiplication. (Nor in any of the other integer
>> arithmetic operations, for that matter.)
> Or am I misreading the spec?
Spec compliance is
Tom Lane wrote:
This isn't a division problem --- the difficulty is there's no check for
overflow in int4 multiplication. (Nor in any of the other integer
arithmetic operations, for that matter.)
It seems to me that SQL2003, Section 6.26 (,
"General Rules", item 5) requires that we check for over
"=?iso-8859-2?Q?Gyenese_P=E1l_Attila?=" <[EMAIL PROTECTED]> writes:
> REASON IS:
> SELECT 365*1000 ;
> result: -644967296
> wrong
This isn't a division problem --- the difficulty is there's no check for
overflow in int4 multiplication. (Nor in any of the other integer
arithmetic operations,
pgsql-7.4.2
I think it's not a bug, just interesting results:
SELECT 9223372036854775807/(365*1000) ;
result: -14300526699
wrong
SELECT ( 9223372036854775807/365 )/1000 ;
result: 2526951242
good
SELECT ( 9223372036854775807::real /(365*1000) ) ;
result: -14300526699,6589
w