> > I claim the parser is doing the wrong thing by representing this as
> > "where int4(i2) = 400::int4" rather than "where i2 = 400::int2".
> > It is not really reasonable to expect the optimizer to clean up
> > after that initial mistake.
> I don't see that.
Yup. The parser is behaving as Bruce describes. The new type conversion
stuff isn't the fundamental problem. It's the original features in the
planner when trying to use indices.
> The problem is how do we use indexes for this? I am still researching
> this.
OK, let me know if I can help look into anything. In the meantime, I'll
keep poking at it a bit...
- Tom