lower integer bound not supported

From: Sandro Santilli <strk(at)kbt(dot)io>
To: pgsql-bugs(at)postgresql(dot)org
Subject: lower integer bound not supported
Date: 2016-06-08 16:08:00
Message-ID: 20160608160800.GB13838@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

According to documentation (from 9.1 to 9.5) the supported
integer ranges are these ones:

smallint 2 bytes -32768 to +32767
integer 4 bytes -2147483648 to +2147483647
bigint 8 bytes -9223372036854775808 to +9223372036854775807

But the lowest bound is not really supported:

# select -32768::int2;
ERROR: smallint out of range
# select -2147483648::int4;
ERROR: integer out of range
# select -9223372036854775808::int8;
ERROR: bigint out of range

This happens with server versions 9.1.22, 9.3.6 and 9.5(unspecified).

Is it the code or the documentation being broken ?
To me, the documentation makes the most sense, and the code is broken.

--strk;

() Free GIS & Flash consultant/developer
/\ https://strk.kbt.io/services.html

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-06-08 16:37:59 Re: lower integer bound not supported
Previous Message Tom Lane 2016-06-08 14:32:52 Re: Case in Order By Ignored without warning or error