Skip to content

Commit

Permalink
PG16: Reset PlannerInfo->placeholdersFrozen
Browse files Browse the repository at this point in the history
Reset the flag to control PlaceHolderInfo creation because we're copying
the entire content of the (PlannerInfo *)root data structure when
building the first/last path.

postgres/postgres@b3ff6c74
  • Loading branch information
fabriziomello committed Oct 7, 2023
1 parent 6304c7a commit 3cdb15a
Show file tree
Hide file tree
Showing 2 changed files with 4,479 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/planner/agg_bookend.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,11 @@ build_first_last_path(PlannerInfo *root, FirstLastAggInfo *fl_info, Oid eqop, Oi
subroot->parse = parse = copyObject(root->parse);
IncrementVarSublevelsUp((Node *) parse, 1, 1);

#if PG16_GE
/* Reset placeholdersFrozen: https://github.com/postgres/postgres/commit/b3ff6c74 */
subroot->placeholdersFrozen = false;
#endif

/* append_rel_list might contain outer Vars? */
subroot->append_rel_list = copyObject(root->append_rel_list);
IncrementVarSublevelsUp((Node *) subroot->append_rel_list, 1, 1);
Expand Down
Loading

0 comments on commit 3cdb15a

Please sign in to comment.