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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9bfd2822b3201f6b0de1e87305b11ee3885b36d9
Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 12 ++----------
src/backend/optimizer/util/pathnode.c | 18 ++++++++++--------
src/test/regress/expected/memoize.out | 24 ++++++++++++++++++++++++
src/test/regress/sql/memoize.sql | 8 ++++++++
4 files changed, 44 insertions(+), 18 deletions(-)