christopher.hamel@zimmer.com writes:
> If I specifically invoke the range on both the h and l tables, it will work
> fine, but since the join specifies those fields have to be the same, can
> that condition be propagated automatically?
No. We currently deduce equality transitively, so the planner is able to
extract the constraint l.transaction_date = '2014-03-01' from your query
(and then use that to reason about the check constraints on l's children).
But there's nothing comparable for inequalities, and it's not clear that
adding such logic to the planner would be a net win. It would be more
complicated than the equality case and less often useful.
regards, tom lane