aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/explain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r--src/backend/commands/explain.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 4195e2c6802..9100c404ad7 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.202 2010/02/16 20:07:13 stark Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.203 2010/02/16 22:19:59 adunstan Exp $
*
*-------------------------------------------------------------------------
*/
@@ -488,6 +488,21 @@ ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
}
/*
+ * ExplainQueryText -
+ * add a "Query Text" node that contains the actual text of the query
+ *
+ * The caller should have set up the options fields of *es, as well as
+ * initializing the output buffer es->str.
+ *
+ */
+void
+ExplainQueryText(ExplainState *es, QueryDesc *queryDesc)
+{
+ if (queryDesc->sourceText)
+ ExplainPropertyText("Query Text", queryDesc->sourceText, es);
+}
+
+/*
* report_triggers -
* report execution stats for a single relation's triggers
*/