BUG #1626: Minimum documented values aren't accepted for all basic integer types

From: "Dennis Vshivkov" <walrus(at)amur(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1626: Minimum documented values aren't accepted for all basic integer types
Date: 2005-04-26 08:34:51
Message-ID: 20050426083451.80F68F0BAC@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1626
Logged by: Dennis Vshivkov
Email address: walrus(at)amur(dot)ru
PostgreSQL version: 7.4.6, 8.0.2
Operating system: Debian GNU/Linux sarge, kernel 2.4.x
Description: Minimum documented values aren't accepted for all basic
integer types
Details:

8.0 documentation states:

Table 8-2. Numeric Types
Name Range
smallint -32768 to +32767
integer -2147483648 to +2147483647
bigint -9223372036854775808 to 9223372036854775807

However,

# SELECT -32768::SMALLINT;
ERROR: smallint out of range
# SELECT -2147483648::INTEGER;
ERROR: integer out of range
# SELECT -9223372036854775808::BIGINT;
ERROR: bigint out of range

# SELECT version();
PostgreSQL 8.0.2 on i386-pc-linux-gnu, compiled by GCC cc (GCC) 3.3.5
(Debian 1:3.3.5-5)

7.4.6 also produces errors, albeit the message is
invariably `integer out of range' in all three cases.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John Danger 2005-04-26 13:50:41 BUG #1627: Fails to compile
Previous Message Tom Lane 2005-04-25 22:20:38 Re: Postgres 7.4.6 hang in async_notify