debug_out -> output
authorRobert Haas <rhaas@postgresql.org>
Fri, 27 Jun 2025 14:51:14 +0000 (10:51 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 27 Jun 2025 14:51:14 +0000 (10:51 -0400)
contrib/pg_plan_advice/pgpa_output.c

index 8491ce6c6eeeaa9d8fc6ddfa071245708c95b2a1..63e393c977d1bcda42cef782aa2b83aea8579680 100644 (file)
@@ -21,15 +21,15 @@ typedef struct pgpa_output_context
        int                     wrap_column;
 } pgpa_output_context;
 
-static void pgpa_debug_out_clumped_join(pgpa_output_context *context,
-                                                                               pgpa_clumped_join *clump);
-static void pgpa_debug_out_unrolled_join(pgpa_output_context *context,
-                                                                                pgpa_unrolled_join *join,
-                                                                                bool toplevel);
-static void pgpa_debug_out_gathered_join(pgpa_output_context *context,
-                                                                                pgpa_gathered_join *gathered_join);
-static void pgpa_debug_out_join_member(pgpa_output_context *context,
-                                                                          pgpa_join_member *member);
+static void pgpa_output_clumped_join(pgpa_output_context *context,
+                                                                        pgpa_clumped_join *clump);
+static void pgpa_output_unrolled_join(pgpa_output_context *context,
+                                                                         pgpa_unrolled_join *join,
+                                                                         bool toplevel);
+static void pgpa_output_gathered_join(pgpa_output_context *context,
+                                                                         pgpa_gathered_join *gathered_join);
+static void pgpa_output_join_member(pgpa_output_context *context,
+                                                                       pgpa_join_member *member);
 
 static char *pgpa_cstring_join_clump_strategy(pgpa_join_clump_strategy strategy);
 static char *pgpa_cstring_join_strategy(pgpa_join_strategy strategy);
@@ -53,7 +53,7 @@ pgpa_output_advice(StringInfo buf, pgpa_plan_walker_context *walker,
 
                if (buf->len > 0)
                        appendStringInfoChar(buf, '\n');
-               pgpa_debug_out_unrolled_join(&context, ujoin, true);
+               pgpa_output_unrolled_join(&context, ujoin, true);
        }
 
        foreach(lc, walker->clumped_joins)
@@ -62,7 +62,7 @@ pgpa_output_advice(StringInfo buf, pgpa_plan_walker_context *walker,
 
                if (buf->len > 0)
                        appendStringInfoChar(buf, '\n');
-               pgpa_debug_out_clumped_join(&context, cjoin);
+               pgpa_output_clumped_join(&context, cjoin);
        }
 
        foreach(lc, walker->gathered_joins)
@@ -71,13 +71,13 @@ pgpa_output_advice(StringInfo buf, pgpa_plan_walker_context *walker,
 
                if (buf->len > 0)
                        appendStringInfoChar(buf, '\n');
-               pgpa_debug_out_gathered_join(&context, gathered_join);
+               pgpa_output_gathered_join(&context, gathered_join);
        }
 }
 
 static void
-pgpa_debug_out_clumped_join(pgpa_output_context *context,
-                                                       pgpa_clumped_join *clump)
+pgpa_output_clumped_join(pgpa_output_context *context,
+                                                pgpa_clumped_join *clump)
 {
        char       *cstrategy;
        int                     rti = -1;
@@ -107,15 +107,15 @@ pgpa_debug_out_clumped_join(pgpa_output_context *context,
 }
 
 static void
-pgpa_debug_out_unrolled_join(pgpa_output_context *context,
-                                                        pgpa_unrolled_join *join, bool toplevel)
+pgpa_output_unrolled_join(pgpa_output_context *context,
+                                                 pgpa_unrolled_join *join, bool toplevel)
 {
        if (toplevel)
                appendStringInfo(context->buf, "JOIN_ORDER(");
        else
                appendStringInfoChar(context->buf, '(');
 
-       pgpa_debug_out_join_member(context, &join->outer);
+       pgpa_output_join_member(context, &join->outer);
 
        for (int k = 0; k < join->ninner; ++k)
        {
@@ -127,7 +127,7 @@ pgpa_debug_out_unrolled_join(pgpa_output_context *context,
 
                pgpa_maybe_linebreak(context->buf, context->wrap_column);
                appendStringInfoChar(context->buf, ' ');
-               pgpa_debug_out_join_member(context, &join->inner[k]);
+               pgpa_output_join_member(context, &join->inner[k]);
        }
 
        if (toplevel)
@@ -137,8 +137,8 @@ pgpa_debug_out_unrolled_join(pgpa_output_context *context,
 }
 
 static void
-pgpa_debug_out_gathered_join(pgpa_output_context *context,
-                                                        pgpa_gathered_join *gathered_join)
+pgpa_output_gathered_join(pgpa_output_context *context,
+                                                 pgpa_gathered_join *gathered_join)
 {
        int                     rti = -1;
        bool            first = true;
@@ -170,13 +170,13 @@ pgpa_debug_out_gathered_join(pgpa_output_context *context,
 }
 
 static void
-pgpa_debug_out_join_member(pgpa_output_context *context,
-                                                  pgpa_join_member *member)
+pgpa_output_join_member(pgpa_output_context *context,
+                                               pgpa_join_member *member)
 {
        if (member->clump_join != NULL)
-               pgpa_debug_out_clumped_join(context, member->clump_join);
+               pgpa_output_clumped_join(context, member->clump_join);
        else if (member->unrolled_join != NULL)
-               pgpa_debug_out_unrolled_join(context, member->unrolled_join, false);
+               pgpa_output_unrolled_join(context, member->unrolled_join, false);
        else
        {
                if (context->rt_identifiers[member->rti - 1] == NULL)