diff options
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r-- | src/backend/commands/explain.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 2f08297d069..1a61c684240 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.27 1998/11/22 10:48:34 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.28 1998/12/14 05:18:43 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -146,11 +146,11 @@ ExplainOneQuery(Query *query, bool verbose, CommandDest dest) static void explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es) { - List *l; + List *l; Relation relation; - char *pname; - char buf[1000]; - int i; + char *pname, + buf[1000]; + int i; if (plan == NULL) { @@ -207,11 +207,6 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es) break; } -#if 0 - for (i = 0; i < indent; i++) - appendStringInfo(str, " "); -#endif - appendStringInfo(str, pname); switch (nodeTag(plan)) { @@ -233,7 +228,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es) appendStringInfo(str, " on "); if (strcmp(rte->refname, rte->relname) != 0) { - sprintf(buf, "%s ", rte->relname); + snprintf(buf, 1000, "%s ", rte->relname); appendStringInfo(str, buf); } appendStringInfo(str, rte->refname); @@ -244,7 +239,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es) } if (es->printCost) { - sprintf(buf, " (cost=%.2f size=%d width=%d)", + snprintf(buf, 1000, " (cost=%.2f size=%d width=%d)", plan->cost, plan->plan_size, plan->plan_width); appendStringInfo(str, buf); } |