Re: BUG #5076: LEFT OUTER JOIN and WHERE madness - Mailing list pgsql-bugs

From
Subject Re: BUG #5076: LEFT OUTER JOIN and WHERE madness
Date
Msg-id 88b991e3d1a545b4db5ccb84652b6af3@localhost
Whole thread Raw
In response to Re: BUG #5076: LEFT OUTER JOIN and WHERE madness  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Sun, 27 Sep 2009 00:31:04 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Mauro Infantino" <mauro.infantino@latincontrol-soft.com> writes:
>> I'm just experiencing the same as in here,
>> http://archives.postgresql.org/pgsql-bugs/2008-06/msg00175.php
>> It was not happening for 8.3.7 (at least on Windows).
>
> This is the very definition of an unhelpful bug report.
>
> You are not seeing the same thing that was reported against 8.3.3,
> because that bug is fixed --- there's a regression test proving so.
> You might be seeing something else with a similar symptom, but with
> no details or test case, there is nothing we can do about it.
>
>             regards, tom lane

Thank you for your answer, Tom.

Attached is what I think would be enough to reproduce the problem. Please
tell me if you need anything else.

When I use this query,

SELECT v_relacionatributocont.bo_place_id,
       v_relacionatributocont.descripcion,
       v_relacionatributocont.atributo_id,
       v_atributos.lista
FROM   v_relacionatributocont
       LEFT OUTER JOIN v_atributos ON v_relacionatributocont.atributo_id =
v_atributos.id
WHERE  v_relacionatributocont.bo_place_id =
'{BF0EFA28-A615-11D5-B09D-004854841C8A}'
       AND v_relacionatributocont.atributo_id IS NOT NULL
       AND (v_atributos.lista = '' OR v_atributos.lista IS NULL)

I get three rows when only one should be returned. It's easier to see it
just by removing the last condition of the where clause. Just take a look
at the "lista" column's content.

Please tell me if I'm not seeing something obvious.

Thanks in advance,
Mauro Infantino.


Attachment

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block
Next
From: "Dan French"
Date:
Subject: BUG #5092: to_ascii(); ascii() don't work with bytea