From 02490d4692c46bee3e9279e79c5d07c576d2a32c Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Sat, 12 Dec 2009 00:35:34 +0000 Subject: Export ExplainBeginOutput() and ExplainEndOutput() for auto_explain. Without these functions, anyone outside of explain.c can't actually use ExplainPrintPlan, because the ExplainState won't be initialized properly. The user-visible result of this was a crash when using auto_explain with the JSON output format. Report by Euler Taveira de Oliveira. Analysis by Tom Lane. Patch by me. --- src/include/commands/explain.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/commands') diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h index 7137a7ab41e..75b5ed3d3c7 100644 --- a/src/include/commands/explain.h +++ b/src/include/commands/explain.h @@ -6,7 +6,7 @@ * 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 */ -- cgit v1.2.3