Bug with int2 - Mailing list pgsql-hackers

From Feng Tian
Subject Bug with int2
Date
Msg-id CAFWGqntMsAAmeaQgBE40z6at9KrNHRxh__Y36mA5BdXsQXXU=Q@mail.gmail.com
Whole thread
Responses Re: Bug with int2
Re: Bug with int2
Re: Bug with int2
List pgsql-hackers
I run into the following.   Seems this is a bug for -32768, which should be a valid smallint value.

Test was run on 9.4.5.

Thanks,
Feng

ftian=# select 32767::int2;                                                                                                                                                                   
 int2  
-------
 32767
(1 row)

ftian=# select -32767::int2;
 ?column? 
----------
   -32767
(1 row)

ftian=# select 32768::int2;                                                                                                                                                                   
ERROR:  smallint out of range
ftian=# select -32768::int2;
ERROR:  smallint out of range
ftian=# 

pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: How are CREATE EXTENSION ... VERSION or ALTER EXTENSION ... UPDATE TO ... intended to work?
Next
From: Tom Lane
Date:
Subject: Re: How are CREATE EXTENSION ... VERSION or ALTER EXTENSION ... UPDATE TO ... intended to work?