On Wed, Feb 17, 2016 at 12:27 PM, Feng Tian <ftian(at)vitessedata(dot)com> wrote:
> ftian=# select -32768::int2;
> ERROR: smallint out of range
But 32768 is not. You should just use parenthesis, a cast does not
take into account the minus sign here:
=# select (-32768)::int2;
int2
--------
-32768
(1 row)
--
Michael