Re: Math Huh? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Math Huh?
Date
Msg-id 11059.1022802214@sss.pgh.pa.us
Whole thread Raw
In response to Math Huh?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Math Huh?
List pgsql-sql
Josh Berkus <josh@agliodbs.com> writes:
> jwnet=> select (255 * 255 * 255 * 255);
>  ?column?
> -----------
>  -66716671
> (1 row)

> So, a bug, or what?

(yawn) int4 overflow.  Use float or numeric if you want overflow
robustness...
        regards, tom lane


pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Math Huh?
Next
From: David Stanaway
Date:
Subject: Re: Math Huh?