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

Re: Bug 4906 -- Left join of subselect incorrect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mathieu Fenniak <mathieu(at)fenniak(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug 4906 -- Left join of subselect incorrect
Date: 2009-07-20 23:28:56
Message-ID: 29374.1248132536@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Mathieu Fenniak <mathieu(at)fenniak(dot)net> writes:
> After running the attached setup.sql.gz SQL script on a PostgreSQL  
> 8.4.0 database, the following two queries which should be logically  
> identical return different results.  As far as I can tell from the  
> query analysis, the LEFT JOIN on query A is happening after  
> "ee.projectid = pc.projectid" is filtered; therefore the rows where  
> projectid is NULL are not visible in query A.

Yeah, it seems to be confused about whether it can interchange the
order of the semijoin and left join.  I'll take a look.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2009-07-20 23:54:10
Subject: Re: BUG #4929: Corrupted pg_class, possibly truncate/rollback related
Previous:From: Andrew GierthDate: 2009-07-20 23:05:22
Subject: Re: BUG #4929: Corrupted pg_class, possibly truncate/rollback related

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