Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BD97F6321E5 for ; Fri, 17 Jul 2009 20:20:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08787-03 for ; Fri, 17 Jul 2009 20:20:00 -0300 (ADT) Received: from cvs.postgresql.org (cvs.postgresql.org [217.196.146.206]) by mail.postgresql.org (Postfix) with ESMTP id E02F5633582 for ; Fri, 17 Jul 2009 20:20:00 -0300 (ADT) Received: by cvs.postgresql.org (Postfix, from userid 1007) id 8D7DA75331E; Fri, 17 Jul 2009 23:19:59 +0000 (UTC) MIME-Version: 1.0 To: pgsql-committers@postgresql.org Subject: pgsql: Repair bug #4926 "too few pathkeys for mergeclauses". X-Mailer: activitymail 1.24, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain Message-Id: <20090717231959.8D7DA75331E@cvs.postgresql.org> Date: Fri, 17 Jul 2009 23:19:59 +0000 (UTC) From: tgl@postgresql.org (Tom Lane) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/152 X-Sequence-Number: 37755 Log Message: ----------- 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. Tags: ---- REL8_4_STABLE Modified Files: -------------- pgsql/src/backend/optimizer/path: pathkeys.c (r1.97 -> r1.97.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/pathkeys.c?r1=1.97&r2=1.97.2.1) pgsql/src/backend/optimizer/plan: createplan.c (r1.260 -> r1.260.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c?r1=1.260&r2=1.260.2.1) pgsql/src/test/regress/expected: join.out (r1.36 -> r1.36.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join.out?r1=1.36&r2=1.36.2.1) pgsql/src/test/regress/sql: join.sql (r1.27 -> r1.27.2.1) (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/join.sql?r1=1.27&r2=1.27.2.1)