From: Tomas Vondra Date: Tue, 23 Aug 2016 15:57:57 +0000 (+0200) Subject: cast contain_mutable_functions() parameters to (Node*) X-Git-Tag: XL9_5_R1_4~40 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e0e8a43544ca88c58f8be3b642d6bc7fed6bd8eb;p=postgres-xl.git cast contain_mutable_functions() parameters to (Node*) When calling the function for a target list, the compiler complains because it expects (Node*) but gets (List*). So fix that simply by casting to (Node*). Also fix a trivial typo in preprocess_rowmarks() - double semicolon, triggering warning about mixed declarations and code. --- diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 2b4e17c3ad..5c828ef718 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -2732,7 +2732,7 @@ grouping_planner(PlannerInfo *root, double tuple_fraction) ((root->distribution->distributionType == 'H' && bms_num_members(root->distribution->restrictNodes) == 1) || (root->distribution->distributionType == 'R' && - !contain_mutable_functions(result_plan->targetlist))))) + !contain_mutable_functions((Node *)result_plan->targetlist))))) result_plan = (Plan *) make_remotesubplan(root, result_plan, root->distribution, @@ -3094,10 +3094,10 @@ preprocess_rowmarks(PlannerInfo *root) */ CheckSelectLocking(parse, ((RowMarkClause *) linitial(parse->rowMarks))->strength); -#ifdef XCP + if (parse->jointree) { - Bitmapset *baserels = get_base_rel_indexes((Node *) parse->jointree);; + Bitmapset *baserels = get_base_rel_indexes((Node *) parse->jointree); int x, num_rels = 0; bool dist_found = false; @@ -3119,7 +3119,6 @@ preprocess_rowmarks(PlannerInfo *root) LCS_asString(((RowMarkClause *) linitial(parse->rowMarks))->strength)))); } -#endif } else {