"Dennis Vshivkov" <walrus(at)amur(dot)ru> writes:> # SELECT -32768::SMALLINT;> ERROR: smallint out of range
Not a bug, because that is read as "-(32768::SMALLINT)", per thedocumented operator precedence. Try (-32768)::SMALLINT.
regards, tom lane