From: Tomas Vondra Date: Tue, 23 Aug 2016 15:57:57 +0000 (+0200) Subject: cast contain_mutable_functions() parameters to (Node*) X-Git-Tag: XL_10_R1BETA1~593 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=67533e299a6ae93e72659bc0d5b128b4dc6ffbe9;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 2c55d035a4..45cf90b454 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -2714,7 +2714,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, @@ -3081,10 +3081,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; @@ -3106,7 +3106,6 @@ preprocess_rowmarks(PlannerInfo *root) LCS_asString(((RowMarkClause *) linitial(parse->rowMarks))->strength)))); } -#endif } else {