Fix a bug in the original implementation of redundant-join-clause removal:

Tom Lane <tgl@sss.pgh.pa.us>

Commit: ed5d55dafe96627fe810dec80ccba98df0b6834b
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2007-07-31T19:53:37Z
Releases: 8.3.0
Fix a bug in the original implementation of redundant-join-clause removal:
clauses in which one side or the other references both sides of the join
cannot be removed as redundant, because that expression won't have been
constrained below the join.  Per report from Sergey Burladyan.

CVS HEAD does not contain this bug due to EquivalenceClass rewrite, but it
seems wise to include the regression test for it anyway.

Files