Antal Attila <atesz@ritek.hu> writes:
> If this is a deficiency of the planner, I'd like to suggest this feature
> into the planner.
This really falls into the category of "you've got to be kidding".
There's no way that it'd be reasonable for the planner to expend cycles
on every query to look for corner cases like this. Do the
hand-optimization instead.
regards, tom lane