postgresql/src/backend/optimizer/path
David Rowley ae89129aa3 Don't Memoize lateral joins with volatile join conditions
The use of Memoize was already disabled in normal joins when the join
conditions had volatile functions per the code in
match_opclause_to_indexcol().  Ordinarily, the parameterization for the
inner side of a nested loop will be an Index Scan or at least eventually
lead to an index scan (perhaps nested several joins deep). However, for
lateral joins, that's not the case and seq scans can be parameterized
too, so we can't rely on match_opclause_to_indexcol().

Here we explicitly check the parameterization for volatile functions and
don't consider the generation of a Memoize path when such functions
are present.

Author: Richard Guo
Discussion: https://postgr.es/m/CAMbWs49nHFnHbpepLsv_yF3qkpCS4BdB-v8HoJVv8_=Oat0u_w@mail.gmail.com
Backpatch-through: 14, where Memoize was introduced
2023-08-07 22:14:54 +12:00
..
allpaths.c Fix some typos and some incorrectly duplicated words 2023-04-18 14:03:49 +12:00
clausesel.c Do assorted mop-up in the planner. 2023-01-30 13:44:36 -05:00
costsize.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
equivclass.c Fix filtering of "cloned" outer-join quals some more. 2023-05-25 10:28:33 -04:00
indxpath.c Don't use partial unique indexes for unique proofs in the planner 2023-06-19 13:00:42 +12:00
joinpath.c Don't Memoize lateral joins with volatile join conditions 2023-08-07 22:14:54 +12:00
joinrels.c Avoid compiler warning in non-assert builds. 2023-07-22 10:32:52 -04:00
Makefile Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
pathkeys.c Support "Right Anti Join" plan shapes. 2023-04-05 16:59:09 -04:00
tidpath.c Make Vars be outer-join-aware. 2023-01-30 13:16:20 -05:00