cast contain_mutable_functions() parameters to (Node*)
authorTomas Vondra <[email protected]>
Tue, 23 Aug 2016 15:57:57 +0000 (17:57 +0200)
committerPavan Deolasee <[email protected]>
Fri, 26 Aug 2016 11:18:06 +0000 (16:48 +0530)
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.

src/backend/optimizer/plan/planner.c

index 2b4e17c3adbc966029398ed712bf41e0154af2bc..5c828ef718cce3cf814d0fddcc44bfc734b2b1ad 100644 (file)
@@ -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
        {