diff options
Diffstat (limited to 'src/backend/commands/prepare.c')
-rw-r--r-- | src/backend/commands/prepare.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index 4ee66969147..56a16401f35 100644 --- a/src/backend/commands/prepare.c +++ b/src/backend/commands/prepare.c @@ -10,7 +10,7 @@ * Copyright (c) 2002-2009, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.98 2009/07/26 23:34:17 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/prepare.c,v 1.99 2009/08/10 05:46:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -685,9 +685,6 @@ ExplainExecuteQuery(ExecuteStmt *execstmt, ExplainState *es, foreach(p, plan_list) { PlannedStmt *pstmt = (PlannedStmt *) lfirst(p); - bool is_last_query; - - is_last_query = (lnext(p) == NULL); if (IsA(pstmt, PlannedStmt)) { @@ -714,9 +711,9 @@ ExplainExecuteQuery(ExecuteStmt *execstmt, ExplainState *es, /* No need for CommandCounterIncrement, as ExplainOnePlan did it */ - /* put a blank line between plans */ - if (!is_last_query) - appendStringInfoChar(es->str, '\n'); + /* Separate plans with an appropriate separator */ + if (lnext(p) != NULL) + ExplainSeparatePlans(es); } if (estate) |