Re: Math Huh?

Поиск
Список
Период
Сортировка
Искать
От
David Stanaway
Тема
Re: Math Huh?
Дата
в 19:54:53
Msg-id
1022802527.25795.7.camel@ciderbox
Ответ на
Math Huh? (Josh Berkus)
Список
Дерево обсуждения
Math Huh? Josh Berkus <josh@agliodbs.com>
Re: Math Huh? Larry Rosenman <ler@lerctr.org>
Re: Math Huh? David Stanaway <david@stanaway.net>
Re: Math Huh? Tom Lane <tgl@sss.pgh.pa.us>
Re: Math Huh? Josh Berkus <josh@agliodbs.com>
Re: Math Huh? Larry Rosenman <ler@lerctr.org>
Re: Math Huh? Achilleus Mantzios <achill@matrix.gatewaynet.com>
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

В списке pgsql-sql по дате отправления
От: Larry Rosenman
Дата:
Сообщение: Re: Math Huh?
От: Josh Berkus
Дата:
Сообщение: Re: Math Huh?
FAQ