From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | Andreas Karlsson <andreas(at)proxel(dot)se> |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Ignored join clause |
Date: | 2018-04-19 02:50:52 |
Message-ID: | 87muy0dk4a.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
>>>>> "Andreas" == Andreas Karlsson <andreas(at)proxel(dot)se> writes:
Andreas> Hi,
Andreas> It seems to me like PostgreSQL incorrectly removes a join
Andreas> clause when planning some queries. I discovered this while
Andreas> debugging a large query, which I below have simplified as much
Andreas> as I could. I suspect the bug may be related to the lateral
Andreas> join but I am not sure.
Fascinating.
What's happening here is not that the condition is being ignored, but
rather that what should be a simple filter condition (or a join filter
at the upper level) is being placed in the "Join Filter" slot of an
outer join at the inner level - where the condition's falsity doesn't
remove the whole row but causes it to be treated as unmatched.
My suspicion is that this is an interaction between lateral and join
reordering. Looking into it further.
--
Andrew (irc:RhodiumToad)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2018-04-19 05:27:32 | Re: BUG #15159: Duplicate records for same primary key |
Previous Message | Andreas Karlsson | 2018-04-18 23:34:47 | Ignored join clause |