From: | "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec> |
---|---|
To: | "David Jaquay" <djaquay(at)gmail(dot)com> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #4413: LEFT JOIN not working as expected |
Date: | 2008-09-09 21:08:05 |
Message-ID: | 3073cc9b0809091408t18b68a52x3b68ea03d129ed64@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Sep 9, 2008 at 3:28 PM, David Jaquay <djaquay(at)gmail(dot)com> wrote:
>
> Description: LEFT JOIN not working as expected
> Details:
>
> I'm seeing a problem with a LEFT JOIN. The sql below demonstrates the
> issue.
>
> What I expect to see is no rows in the output, i.e. the LEFT JOIN should
> pair the two rows together, and the WHERE clause should decide that the
> joined row doesn't match, and should yield no output.
>
> What happens is that the planner appears to apply the WHERE clause early,
> the left table doesn't yield any rows, and the row from the right table is
> output by itself. This only appears to happen when both sides of the OR are
> present, and the idx_beta_datereceived index is present. Remove any one,
> and it works like I expect.
>
This has been reported and fixed already:
http://archives.postgresql.org/pgsql-bugs/2008-06/msg00175.php
if you can compile postgres from sources you can apply the fix Tom
shows. If not you have to wait for 8.3.4.
Is not time for a new minor release?
--
regards,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. (593) 87171157
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-09-09 21:21:00 | Re: BUG #4413: LEFT JOIN not working as expected |
Previous Message | Stephan Szabo | 2008-09-09 21:02:45 | Re: BUG #4412: Check constraints cannot be added to the table for fields that are mixed case |