Re: Math Huh?

Поиск
Список
Период
Сортировка
Искать
От
Larry Rosenman
Тема
Re: Math Huh?
Дата
в 19:45:25
Msg-id
1022802174.2593.3.camel@lerlaptop
Ответ на
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)
> 
> So, a bug, or what?
> 
You exceeded a SIGNED int4.. 
ler=# select (255*255*255*255)
ler-# ;?column?  
------------66716671
(1 row)

ler=# select (255::int8*255::int8*255::int8*255::int8); ?column?  
------------4228250625
(1 row)

ler=# select version();                              version                               
---------------------------------------------------------------------PostgreSQL 7.2.1 on i386-portbld-freebsd4.6, compiled by GCC 2.95.3
(1 row)

ler=# 



> 
> -- 
> -Josh Berkus
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


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