Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I'm researching if smallint can be made a higher-class citizen of our type
> system than currently.
> Does anyone know where to find the discussion refered to here?
> http://archives.postgresql.org/pgsql-hackers/2008-10/msg01485.php
I think this was the last time I tried it:
http://archives.postgresql.org/pgsql-hackers/2002-11/msg00468.php
At the time, the main motivation for worrying about it was that cases
like "WHERE smallintcol = 42" couldn't be indexed, because 42 is int4
not int2. We've since fixed that by allowing cross-type operators
to be indexable.
I also notice that one of the failure cases I cited might no longer be
an issue now that we don't have implicit casts to text, but that change
isn't going to do anything for the other cases.
On the whole I'm still afraid that changing the initial typing of
integer constants is going to break a lot of code while buying not much.
Do you have a specific reason for reopening the issue? Or is your
concern something different?
regards, tom lane