You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Allow Memoize to operate in binary comparison mode
Memoize would always use the hash equality operator for the cache keytypes to determine if the current set of parameters were the same as somepreviously cached set. Certain types such as floating points where -0.0and +0.0 differ in their binary representation but are classed as equal bythe hash equality operator may cause problems as unless the join uses thesame operator it's possible that whichever join operator is being usedwould be able to distinguish the two values. In which case we mayaccidentally return in the incorrect rows out of the cache.To fix this here we add a binary mode to Memoize to allow it to thecurrent set of parameters to previously cached values by comparingbit-by-bit rather than logically using the hash equality operator. Thisbinary mode is always used for LATERAL joins and it's used for normaljoins when any of the join operators are not hashable.Reported-by: Tom LaneAuthor: David RowleyDiscussion:https://postgr.es/m/3004308.1632952496@sss.pgh.pa.usBackpatch-through: 14, where Memoize was added
Remote SQL: SELECT r1."C 1", r2."C 1" FROM ("S 1"."T 1" r1 INNER JOIN "S 1"."T 1" r2 ON (((r1."C 1" = r2."C 1")) AND ((r1.c2 = $1::integer))))
2258
-
(16 rows)
2259
+
(17 rows)
2259
2260
2260
2261
SELECT t1."C 1" FROM "S 1"."T 1" t1, LATERAL (SELECT DISTINCT t2.c1, t3.c1 FROM ft1 t2, ft2 t3 WHERE t2.c1 = t3.c1 AND t2.c2 = t1.c2) q ORDER BY t1."C 1" OFFSET 10 LIMIT 10;