Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> Update with v3 patch, nothing changes except fixes a test failure
> spotted by cfbot.
I think this is pretty close to usable, except that I don't believe
reusing simplify_boolean_equality this way is a great idea.
It does more than we need (surely the LHS-is-Const case cannot occur here)
and it has assumptions that I'm not sure hold --- particularly the bit
about !constisnull. I'd be inclined to just copy-and-paste the three or
four lines we need.
regards, tom lane