Skip site navigation (1) Skip section navigation (2)

pgsql: Fix another semijoin-ordering bug.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix another semijoin-ordering bug.
Date: 2009-07-21 02:02:44
Message-ID: 20090721020244.DD0EE75331E@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Fix another semijoin-ordering bug.  We already knew that we couldn't
reorder a semijoin into or out of the righthand side of another semijoin,
but actually it doesn't work to reorder it into or out of the righthand
side of a left or antijoin, either.  Per bug #4906 from Mathieu Fenniak.

This was sloppy thinking on my part.  This identity does work:

	( A left join B on (Pab) ) semijoin C on (Pac)
==
	( A semijoin C on (Pac) ) left join B on (Pab)

but I failed to see that that doesn't mean this does:

	( A left join B on (Pab) ) semijoin C on (Pbc)
!=
	A left join ( B semijoin C on (Pbc) ) on (Pab)

Modified Files:
--------------
    pgsql/src/backend/optimizer:
        README (r1.49 -> r1.50)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/README?r1=1.49&r2=1.50)
    pgsql/src/backend/optimizer/plan:
        initsplan.c (r1.154 -> r1.155)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/initsplan.c?r1=1.154&r2=1.155)

pgsql-committers by date

Next:From: Tom LaneDate: 2009-07-21 02:02:51
Subject: pgsql: Fix another semijoin-ordering bug.
Previous:From: User BmomjianDate: 2009-07-20 23:51:35
Subject: pg-migrator - pg_migrator: Adjust version checks to be clearer.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group