Integer parsing bug?

Поиск
Список
Период
Сортировка
От Steve Atkins
Тема Integer parsing bug?
Дата
Msg-id 20040227221714.GA21675@gp.word-to-the-wise.com
обсуждение исходный текст
Ответы Re: Integer parsing bug?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-bugs
Section 8.1 of the manual gives the range of an integer
as -2147483648 to +2147483647.


template1=# select '-2147483648'::int;
    int4
-------------
 -2147483648
(1 row)

template1=# select -2147483648::int;
ERROR:  integer out of range

Oops.

template1=# select version();
                           version
-------------------------------------------------------------
 PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

Completely vanilla build - no options other than --prefix to
configure. Clean installation, this is immediately after an initdb.

I see the same bug on Solaris, built with Forte C in 64 bit mode.

Cheers,
  Steve

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Philipp Matthias Hahn
Дата:
Сообщение: round(50.5) = 50
Следующее
От: "Gary WAN"
Дата:
Сообщение: About Create Assertion