Enable use of Memoize atop an Append that came from UNION ALL.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Mar 2023 22:13:35 +0000 (18:13 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 16 Mar 2023 22:13:45 +0000 (18:13 -0400)
commit9bfd2822b3201f6b0de1e87305b11ee3885b36d9
tree6a77ebc0607221c4c884c7fa42a14c168179571c
parent0dc40196f27531ab30bbbc516df9894edc276d6e
Enable use of Memoize atop an Append that came from UNION ALL.

create_append_path() would only apply get_baserel_parampathinfo
when the path is for a partitioned table, but it's also potentially
useful for paths for UNION ALL appendrels.  Specifically, that
supports building a Memoize path atop this one.

While we're in the vicinity, delete some dead code in
create_merge_append_plan(): there's no need for it to support
parameterized MergeAppend paths, and it doesn't look like that
is going to change anytime soon.  It'll be easy enough to undo
this when/if it becomes useful.

Richard Guo

Discussion: https://postgr.es/m/CAMbWs4_ABSu4PWG2rE1q10tJugEXHWgru3U8dAgkoFvgrb6aEA@mail.gmail.com
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/pathnode.c
src/test/regress/expected/memoize.out
src/test/regress/sql/memoize.sql