Bradley Baetz <bbaetz(at)acm(dot)org> writes:
> The attached patch applies the optimisation translating outer joins to
> inner joins (where safe) to the cases where the WHERE clause has OR bits
> in it too, if the column is present (and not null) in all of the OR
> bits.
Your change for AND is obviously incorrect, and I don't think I believe
the OR case either. Why is it safe to pass down a TRUE top_level flag?
regards, tom lane