gcp(at)sjeng(dot)org writes:
> That is, when given:
> join matches on matches.seq = matches_players.seq
> where matches.seq > 1151575404 and matches.seq < 1155066769
> there should be no need to add:
> and matches_players.seq > 1151575404 and matches_players.seq <
> 1155066769;
> because this is implied by the JOIN ON.
We do make deductions of this sort for equality constraints, but not for
inequalities. There are no plans to teach the planner to do such
deductions. Sorry, but for most queries trying to propagate inequalities
would just chew up planning cycles with little result. The fact that when
it does apply it can be a big win doesn't convince me that it wouldn't be
a net loss overall.
regards, tom lane