From 3144099254e3e5654c3c1e741b94290ef6baa1b0 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Sat, 7 Oct 2023 21:38:57 +0200 Subject: [PATCH] Fix first/last on PG16 --- src/planner/agg_bookend.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/planner/agg_bookend.c b/src/planner/agg_bookend.c index e08eb0986fd..5fe9a32d866 100644 --- a/src/planner/agg_bookend.c +++ b/src/planner/agg_bookend.c @@ -60,6 +60,7 @@ #include #include +#include "compat/compat.h" #include "planner.h" #include "utils.h" #include "extension.h" @@ -593,6 +594,9 @@ build_first_last_path(PlannerInfo *root, FirstLastAggInfo *fl_info, Oid eqop, Oi /* and we haven't made equivalence classes, either */ Assert(subroot->eq_classes == NIL); /* and we haven't created PlaceHolderInfos, either */ +#if PG16_GE + subroot->placeholdersFrozen = false; +#endif Assert(subroot->placeholder_list == NIL); mminfo = fl_info->m_agg_info;