mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Add query text to auto_explain output.
Still to be done: fix docs and fix regression failures under auto_explain.
This commit is contained in:
@ -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 $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -487,6 +487,21 @@ ExplainPrintPlan(ExplainState *es, QueryDesc *queryDesc)
|
||||
NULL, NULL, NULL, es);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
Reference in New Issue
Block a user