index 531f076525488e1f92c412e52b3bd8e79f8bbedf..88d40c718870e2d6700cf0b6200ed8e6602197c2 100644 (file)
* Copyright (c) 2008-2009, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/contrib/auto_explain/auto_explain.c,v 1.8 2009年12月11日 01:33:35 adunstan Exp $
+ * $PostgreSQL: pgsql/contrib/auto_explain/auto_explain.c,v 1.9 2009年12月12日 00:35:33 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -223,7 +223,9 @@ explain_ExecutorEnd(QueryDesc *queryDesc)
es.verbose = auto_explain_log_verbose;
es.format = auto_explain_log_format;
+ ExplainBeginOutput(&es);
ExplainPrintPlan(&es, queryDesc);
+ ExplainEndOutput(&es);
/* Remove last line break */
if (es.str->len > 0 && es.str->data[es.str->len - 1] == '\n')
index 0970723a6deb57ef86281a532d8c5c2ca7305834..c34b5751e463ad9fe8bd5b315efb9f599e5ea197 100644 (file)
* Portions Copyright (c) 1994-5, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.194 2009年12月11日 01:33:35 adunstan Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.195 2009年12月12日 00:35:33 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -91,8 +91,6 @@ static void ExplainCloseGroup(const char *objtype, const char *labelname,
bool labeled, ExplainState *es);
static void ExplainDummyGroup(const char *objtype, const char *labelname,
ExplainState *es);
-static void ExplainBeginOutput(ExplainState *es);
-static void ExplainEndOutput(ExplainState *es);
static void ExplainXMLTag(const char *tagname, int flags, ExplainState *es);
static void ExplainJSONLineEnding(ExplainState *es);
static void ExplainYAMLLineStarting(ExplainState *es);
@@ -1791,7 +1789,7 @@ ExplainDummyGroup(const char *objtype, const char *labelname, ExplainState *es)
* This is just enough different from processing a subgroup that we need
* a separate pair of subroutines.
*/
-static void
+void
ExplainBeginOutput(ExplainState *es)
{
switch (es->format)
/*
* Emit the end-of-output boilerplate.
*/
-static void
+void
ExplainEndOutput(ExplainState *es)
{
switch (es->format)
index 7137a7ab41ef53271ca727844dfd650ee09a3888..75b5ed3d3c7e6c70e341669288a337a74f286006 100644 (file)
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994-5, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.42 2009年12月11日 01:33:35 adunstan Exp $
+ * $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.43 2009年12月12日 00:35:34 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -65,6 +65,8 @@ extern void ExplainOnePlan(PlannedStmt *plannedstmt, ExplainState *es,
extern void ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc);
+extern void ExplainBeginOutput(ExplainState *es);
+extern void ExplainEndOutput(ExplainState *es);
extern void ExplainSeparatePlans(ExplainState *es);
#endif /* EXPLAIN_H */