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

Re: 8.2 bug with outer join reordering

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 8.2 bug with outer join reordering
Date: 2006-12-06 20:59:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> On 8.1 this returns 1 record. On 8.2 this returns 100000. It appears to
> be applying the filter too soon, and then it does an outer join which
> violates the WHERE.

AFAICS the outer join reordering is perfectly legal --- the problem is
that the WHERE condition is being allowed to bubble down too far.
I can't reproduce it with less than four tables, so it's a pretty
weird corner case.  Apparently there's something wrong with
distribute_qual_to_rels' logic for determining qual placement, but
I'm not sure what yet ...

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Pavel StehuleDate: 2006-12-06 21:25:18
Subject: Re: SQL/PSM implemenation for PostgreSQL (roadmap)
Previous:From: Tom LaneDate: 2006-12-06 20:37:19
Subject: Re: psql return codes

pgsql-bugs by date

Next:From: Tom LaneDate: 2006-12-06 22:20:41
Subject: Re: 8.2 bug with outer join reordering
Previous:From: Alex PiyevskyDate: 2006-12-06 20:38:49
Subject: BUG #2812: Transaction is aborted after error

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