Fix a bug in the original implementation of redundant-join-clause removal:
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Jul 2007 19:53:50 +0000 (19:53 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Jul 2007 19:53:50 +0000 (19:53 +0000)
commite403f0959e3549e05f78faa618ac196f6819b4c0
tree8be0ee360ae2e6ca7f5cce61468556493fdcfd1e
parentdc89d74f31589a7b18eaa5dfb3954c49500927d1
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.
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/restrictinfo.c
src/include/optimizer/restrictinfo.h
src/test/regress/expected/join.out
src/test/regress/expected/join_1.out
src/test/regress/sql/join.sql