"Kelly Burkhart" <pgkrb(at)kkcsm(dot)net> writes:
> From psql, the following will fail:
> select -32768::int2;
This is not a bug. The reason is that :: binds more tightly than -,
so what you have written is equivalent to
select -(32768::int2);
which obviously *should* fail. Try it as
select (-32768)::int2;
regards, tom lane