]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Repair bug #4926 "too few pathkeys for mergeclauses". This example shows
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Jul 2009 23:19:59 +0000 (23:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Jul 2009 23:19:59 +0000 (23:19 +0000)
commite0fa489a95d7b95d771c73cd32b40dd33a9e4c86
tree23a8d295f0733df85a328627e75e9738a0ba363b
parent1aef7f8c2668f891a6b695633d2d3a2ea8487291
Repair bug #4926 "too few pathkeys for mergeclauses".  This example shows
that the sanity checking I added to create_mergejoin_plan() in 8.3 was a
few bricks shy of a load: the mergeclauses could reference pathkeys in a
noncanonical order such as x,y,x, not only cases like x,x,y which is all
that the code had allowed for.  The odd cases only turn up when using
redundant clauses in an outer join condition, which is why no one had
noticed before.
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/createplan.c
src/test/regress/expected/join.out
src/test/regress/sql/join.sql