fix indentation
authorRobert Haas <[email protected]>
Fri, 26 Sep 2025 19:14:17 +0000 (15:14 -0400)
committerRobert Haas <[email protected]>
Fri, 26 Sep 2025 19:14:17 +0000 (15:14 -0400)
contrib/pg_plan_advice/pgpa_join.c
contrib/pg_plan_advice/pgpa_output.c
contrib/pg_plan_advice/pgpa_planner.c
contrib/pg_plan_advice/pgpa_trove.c
contrib/pg_plan_advice/pgpa_walker.c

index 83df298462a957f20122ecd438e24b9250278a4a..522e9095879c92f9044cc69a023ea04f2a6b9557 100644 (file)
@@ -437,8 +437,8 @@ pgpa_decompose_join(pgpa_plan_walker_context *walker, Plan *plan,
         * The planner may have decided to parallelize part of the join tree, so
         * we could find a Gather or Gather Merge node here. Note that, if
         * present, this will appear below nodes we considered as part of the join
-        * strategy, but we could find another uniqueness-enforcing node below
-        * the Gather or Gather Merge, if present.
+        * strategy, but we could find another uniqueness-enforcing node below the
+        * Gather or Gather Merge, if present.
         */
        if (elidedouter == NULL)
        {
index d753cd1407dfb7a7b2cac2cf9e4609aa8e691c44..90f24c719083ae700d5deb759a32ddef5e0b841b 100644 (file)
@@ -322,8 +322,7 @@ pgpa_output_advice(StringInfo buf, pgpa_plan_walker_context *walker,
        }
 
        /*
-        * Emit advice listing what was NOT beneath a Gather or Gather Merge
-        * node.
+        * Emit advice listing what was NOT beneath a Gather or Gather Merge node.
         */
        pgpa_output_simple_strategy(&context, "NO_GATHER",
                                                                context.no_gather_scans);
index 668b036b655ac8bbdea943129f985d9393b8a93e..acbcf541c5205f6d5bef13cfa340c049813d43c4 100644 (file)
@@ -144,9 +144,9 @@ static void pgpa_planner_apply_joinrel_advice(uint64 *pgs_mask_p,
                                                                                          char *plan_name,
                                                                                          pgpa_join_state *pjs);
 static void pgpa_planner_apply_join_path_advice(JoinType jointype,
-                                                                                  uint64 *pgs_mask_p,
-                                                                                  char *plan_name,
-                                                                                  pgpa_join_state *pjs);
+                                                                                               uint64 *pgs_mask_p,
+                                                                                               char *plan_name,
+                                                                                               pgpa_join_state *pjs);
 static void pgpa_planner_apply_scan_advice(RelOptInfo *rel,
                                                                                   pgpa_trove_entry *entries,
                                                                                   Bitmapset *indexes);
@@ -202,8 +202,8 @@ pgpa_get_relation_info(PlannerInfo *root, Oid relationObjectId,
        pps = GetPlannerGlobalExtensionState(root->glob, planner_extension_id);
 
        /*
-        * The default behavior of propagating the path generation strategy
-        * mask from parents to children is unsuitable for us.
+        * The default behavior of propagating the path generation strategy mask
+        * from parents to children is unsuitable for us.
         *
         * XXX. Maybe that behavior should be rethought.
         */
@@ -400,8 +400,8 @@ pgpa_joinrel_setup(PlannerInfo *root, RelOptInfo *joinrel,
        Assert(bms_membership(joinrel->relids) == BMS_MULTIPLE);
 
        /*
-        * The default behavior of propagating the path generation strategy
-        * mask from parents to children is unsuitable for us.
+        * The default behavior of propagating the path generation strategy mask
+        * from parents to children is unsuitable for us.
         *
         * XXX. Maybe that behavior should be rethought.
         */
@@ -517,8 +517,8 @@ pgpa_planner_setup(PlannerGlobal *glob, Query *parse, const char *query_string,
  * Carry out whatever work we want to do after planning is complete.
  */
 static void
-pgpa_planner_shutdown(PlannerGlobal *glob, Query *parse, const char *query_string,
-                                         PlannedStmt *pstmt)
+pgpa_planner_shutdown(PlannerGlobal *glob, Query *parse,
+                                         const char *query_string, PlannedStmt *pstmt)
 {
        pgpa_planner_state *pps;
 
@@ -579,11 +579,11 @@ pgpa_planner_apply_joinrel_advice(uint64 *pgs_mask_p, char *plan_name,
                pgpa_tkm_type tkm;
 
                /*
-                * The NO_GATHER tag is applied to single relations and applies
-                * to every joinrel that contains them, and the advice trove should
-                * only return entries that overlap with this joinrel. Therefore,
-                * this entry is certainly relevant to this joinrel, and we should
-                * not allow a Gather or Gather Merge here.
+                * The NO_GATHER tag is applied to single relations and applies to
+                * every joinrel that contains them, and the advice trove should only
+                * return entries that overlap with this joinrel. Therefore, this
+                * entry is certainly relevant to this joinrel, and we should not
+                * allow a Gather or Gather Merge here.
                 */
                if (entry->tag == PGPA_TAG_NO_GATHER)
                {
@@ -618,8 +618,8 @@ pgpa_planner_apply_joinrel_advice(uint64 *pgs_mask_p, char *plan_name,
                Assert(tkm != PGPA_TKM_DISJOINT);
 
                /*
-                * If it matches exactly, then do the advice says. If it doesn't,
-                * then don't do whatever the advice says, because it must happen at
+                * If it matches exactly, then do the advice says. If it doesn't, then
+                * don't do whatever the advice says, because it must happen at
                 * whatever joinrel matches exactly, and that's not this one.
                 */
                if (tkm == PGPA_TKM_EQUAL)
@@ -691,9 +691,9 @@ pgpa_planner_apply_joinrel_advice(uint64 *pgs_mask_p, char *plan_name,
                *pgs_mask_p &= ~(PGS_APPEND | PGS_MERGE_APPEND);
 
        /*
-        * To force Gather or Gather Merge, we must disable the other one, plus
-        * we must also disable non-partial paths. To force a non-Gather-based
-        * plan, we disable both Gather and Gather Merge.
+        * To force Gather or Gather Merge, we must disable the other one, plus we
+        * must also disable non-partial paths. To force a non-Gather-based plan,
+        * we disable both Gather and Gather Merge.
         */
        if (force_gather)
                *pgs_mask_p &= ~(PGS_GATHER_MERGE | PGS_CONSIDER_NONPARTIAL);
@@ -1142,13 +1142,13 @@ pgpa_planner_apply_scan_advice(RelOptInfo *rel,
                        my_scan_type = PGS_SEQSCAN;
                else if (my_entry->tag == PGPA_TAG_PARTITIONWISE)
                {
-                       bool    just_one_rel;
+                       bool            just_one_rel;
 
                        /*
-                        * XXX. Is this really correct? It's true that if the user wants
-                        * a PARTITIONWISE scan of just this relation, then we should
-                        * force Append or MergeAppend here, but does it really mattter
-                        * what we do otherwise?
+                        * XXX. Is this really correct? It's true that if the user wants a
+                        * PARTITIONWISE scan of just this relation, then we should force
+                        * Append or MergeAppend here, but does it really mattter what we
+                        * do otherwise?
                         */
                        just_one_rel = my_entry->target->ttype == PGPA_TARGET_IDENTIFIER
                                || list_length(my_entry->target->children) == 1;
@@ -1160,12 +1160,12 @@ pgpa_planner_apply_scan_advice(RelOptInfo *rel,
                else if (my_entry->tag == PGPA_TAG_GATHER |
                                 my_entry->tag == PGPA_TAG_GATHER_MERGE)
                {
-                       bool    just_one_rel;
+                       bool            just_one_rel;
 
                        /*
                         * If GATHER or GATHER_MERGE is applied to a single identifier or
-                        * a list of length 1, then we should force it here. Otherwise,
-                        * we should prevent it here, and force it at the level of the
+                        * a list of length 1, then we should force it here. Otherwise, we
+                        * should prevent it here, and force it at the level of the
                         * joinrel that exactly matches the list of targets.
                         */
                        just_one_rel = my_entry->target->ttype == PGPA_TARGET_IDENTIFIER
@@ -1231,7 +1231,7 @@ pgpa_planner_apply_scan_advice(RelOptInfo *rel,
 
        /* Enforce choice of index. */
        if (scan_entry != NULL && (scan_entry->tag == PGPA_TAG_INDEX_SCAN ||
-               scan_entry->tag == PGPA_TAG_INDEX_ONLY_SCAN))
+                                                          scan_entry->tag == PGPA_TAG_INDEX_ONLY_SCAN))
        {
                pgpa_index_target *itarget = scan_entry->target->itarget;
                IndexOptInfo *matched_index = NULL;
@@ -1274,7 +1274,7 @@ pgpa_planner_apply_scan_advice(RelOptInfo *rel,
        if (scan_type != 0)
        {
                rel->pgs_mask &=
-                       ~(PGS_SCAN_ANY|PGS_APPEND|PGS_MERGE_APPEND|PGS_CONSIDER_INDEXONLY);
+                       ~(PGS_SCAN_ANY | PGS_APPEND | PGS_MERGE_APPEND | PGS_CONSIDER_INDEXONLY);
                rel->pgs_mask |= scan_type;
        }
 
@@ -1282,7 +1282,7 @@ pgpa_planner_apply_scan_advice(RelOptInfo *rel,
        if (gather_mask != 0)
        {
                rel->pgs_mask &=
-                       ~(PGS_GATHER|PGS_GATHER_MERGE|PGS_CONSIDER_NONPARTIAL);
+                       ~(PGS_GATHER | PGS_GATHER_MERGE | PGS_CONSIDER_NONPARTIAL);
                rel->pgs_mask |= gather_mask;
        }
 
index 3a8f6e166fe45042b08c155d43ffc545f9461bff..f177adc1706f3011244d7dcabd3b09017293b78f 100644 (file)
@@ -236,9 +236,9 @@ pgpa_build_trove(List *advice_items)
                                 * partitionwise join exactly those two relations.
                                 *
                                 * NO_GATHER can only be requested for a single relation, but
-                                * as it specifies that the relation should not appear anywhere
-                                * below GATHER or GATHER_MERGE, it also must be enforced at
-                                * the join level.
+                                * as it specifies that the relation should not appear
+                                * anywhere below GATHER or GATHER_MERGE, it also must be
+                                * enforced at the join level.
                                 */
                                foreach_ptr(pgpa_advice_target, target, item->targets)
                                {
index 887d177dd13895aaaed7482e364acb857be69e1a..f2ee7cc34256b0b535e27a922cc88a9eb2240f07 100644 (file)
@@ -136,11 +136,11 @@ pgpa_plan_walker(pgpa_plan_walker_context *walker, Plan *plan,
                        elided_nodes = list_truncate(elided_nodes, num_elided_nodes - 1);
 
                /*
-                * Nothing else will build pgpa_scan objects for non-final elements
-                * of elided_nodes, so do that here. They aren't part of a join
-                * problem, so just attach them directly to the walker object.
+                * Nothing else will build pgpa_scan objects for non-final elements of
+                * elided_nodes, so do that here. They aren't part of a join problem,
+                * so just attach them directly to the walker object.
                 */
-               for (int n = 0; n < num_elided_nodes -1; ++n)
+               for (int n = 0; n < num_elided_nodes - 1; ++n)
                {
                        ElidedNode *elided_node = list_nth(elided_nodes, n);
                        pgpa_scan  *scan;