OSDN Git Service

Get rid of the rather fuzzily defined FlattenedSubLink node type in favor of
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Feb 2009 03:30:38 +0000 (03:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 25 Feb 2009 03:30:38 +0000 (03:30 +0000)
commite549722a8b2fcc5b2ad9a9bd53948466ea5dae26
treea55ae57bb515b353f70a8321a0751ed5aca40044
parent7380b6384b5a0b25fa7dfa7447dbf95ff1c4b8da
Get rid of the rather fuzzily defined FlattenedSubLink node type in favor of
making pull_up_sublinks() construct a full-blown JoinExpr tree representation
of IN/EXISTS SubLinks that it is able to convert to semi or anti joins.
This makes pull_up_sublinks() a shade more complex, but the gain in semantic
clarity is worth it.  I still have more to do in this area to address the
previously-discussed problems, but this commit in itself fixes at least one
bug in HEAD, as shown by added regression test case.
18 files changed:
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/var.c
src/backend/rewrite/rewriteManip.c
src/include/nodes/nodes.h
src/include/nodes/primnodes.h
src/include/nodes/relation.h
src/include/optimizer/subselect.h
src/test/regress/expected/join.out
src/test/regress/expected/join_1.out
src/test/regress/sql/join.sql