Get rid of the rather fuzzily defined FlattenedSubLink node type in favor of
commit30809c5bcd54ae20076dc3fc12cc923a0e28960a
authortgl <tgl>
Wed, 25 Feb 2009 03:30:38 +0000 (25 03:30 +0000)
committertgl <tgl>
Wed, 25 Feb 2009 03:30:38 +0000 (25 03:30 +0000)
treec65be559b8cd4e4eccbe5b1983b1ecd79c435b3b
parent23e1d1a0f2f465a4eea3aa86630c3bc223f744ea
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