]> granicus.if.org Git - postgresql/commit
Repair bug #4926 "too few pathkeys for mergeclauses". This example shows
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Jul 2009 23:20:15 +0000 (23:20 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 17 Jul 2009 23:20:15 +0000 (23:20 +0000)
commitd7bc5e307714b5643a4e5ceb9d5a449ffa0b7213
treeab88a790a7d27dbfb00914ae39f2b9caf4270799
parentb5f32d8dae9f6aa4208b61902f057b30bcdda8dc
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/expected/join_1.out
src/test/regress/sql/join.sql