Re: BUG #18429: Inconsistent results on similar queries with join lateral
David G. Johnston <david.g.johnston@gmail.com>
From: "David G. Johnston" <david.g.johnston@gmail.com>
To: "b.ryder@ateme.com" <b.ryder@ateme.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2024-04-12T13:52:54Z
Lists: pgsql-bugs
On Friday, April 12, 2024, PG Bug reporting form <noreply@postgresql.org> wrote: > The following bug has been logged on the website: > > Bug reference: 18429 > Logged by: Benoît Ryder > Email address: b.ryder@ateme.com > PostgreSQL version: 15.6 > Operating system: Debian > Description: > > -- `where` clause should return false: (14 - 6) / 4 = (12 - 6) / 4 → false > select 1 from c2 where (14 - c2.t) / c2.d = (12 - c2.t) / c2. > You are doing integer division here and the right hand side equals, 1.5; I suppose something may have used to round that up to the integer 2 which would make both sides equals but now (v16) rounds it down (or more accurately truncates it) to 1. David J.
Commits
-
Ensure generated join clauses for child rels have correct relids.
- 03107b4eda7f 17.0 landed
- 91800af13710 16.3 landed
-
Fix generation of EC join conditions at the wrong plan level.
- f502849d49a4 12.19 landed
- d9e4ee74f48c 13.15 landed
- ab2402268c04 14.12 landed
- 5aacfa64e5da 15.7 landed
-
Make Vars be outer-join-aware.
- 2489d76c4906 16.0 cited