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

Re: BUG #3308: Nested outer join gives wrong results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "George Sakkis" <george(dot)sakkis(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3308: Nested outer join gives wrong results
Date: 2007-05-25 21:21:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"George Sakkis" <george(dot)sakkis(at)gmail(dot)com> writes:
> FROM (
>   SELECT as q_id
>   FROM ranker, run, query
>   WHERE = 72 AND 
> = ranker.run_id AND 
>         query.set_id = run.set_id
> ) AS t1
>   SELECT serp_result.q_id
>   FROM serp_result LEFT OUTER JOIN editor_rating using (q_id,norm_url)
>   WHERE serp_result.ranker_id = 72 AND 
>         serp_result.rank <= 1 
>         AND editor_rating.grade is null
> ) AS t2 USING (q_id)

This query looks like it's probably affected by the same bug reported a
couple days ago:
and patched here:

The "WHERE editor_rating.grade is null" bit prevents the two outer joins
from being re-ordered, but released 8.2.x versions fail to notice that.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Dmitry DmitrievDate: 2007-05-26 06:04:23
Subject: BUG #3309: The limitation for number of connection with ODBC driver
Previous:From: George SakkisDate: 2007-05-25 20:24:40
Subject: BUG #3308: Nested outer join gives wrong results

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