| From: | David Stanaway <david(at)stanaway(dot)net> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Math Huh? |
| Date: | 2002-05-30 23:48:47 |
| Message-ID: | 1022802527.25795.7.camel@ciderbox |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Thu, 2002-05-30 at 18:29, Josh Berkus wrote:
> Folks,
>
> I'll let this session speak for itself:
>
> jwnet=> select version();
> version
> ---------------------------------------------------------------
> PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.95.3
> (1 row)
>
> jwnet=> select (255 * 255 * 255 * 255);
> ?column?
> -----------
> -66716671
> (1 row)
scratch=# select (255 * 255 * 255 * 255::int8);
?column?
------------
4228250625
(1 row)
$ bc -l
obase=16
4228250625
FC05FC01
^
You have overflowed a signed integer as the most significant bit is set.
--
David Stanaway
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2002-05-30 23:59:43 | Re: Math Huh? |
| Previous Message | Tom Lane | 2002-05-30 23:43:34 | Re: Math Huh? |