Matt Musgrove <MMusgrove@efji.com> writes:
> Does psql require smallints to be explicitly cast as such?
Undecorated integer-looking constants are taken as integer, bigint, or
numeric depending on size. Not smallint. By and large it's best
not to use smallint as the declared argument type of a function unless
you really have to.
(We have looked into allowing small-enough literals to be taken as
smallint. Turns out to break a whole lot of stuff, by introducing
ambiguities where there were none before, so it's not likely
to ever happen.)
regards, tom lane