Nishad Prakash <prakashn@uci.edu> writes:
> Why doesn't the query planner notice that an int-type index is present
> and perform the cast on its own? Perhaps one of the developers
> can explain? I think users would like this property if it could be
> implemented without breaking anything.
It's been done for 7.5. As for why it wasn't done earlier, well, it
was a hard problem. Read the pgsql-hackers archives.
regards, tom lane