1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Include a pointer to the query's source text in QueryDesc structs. This is

practically free given prior 8.4 changes in plancache and portal management,
and it makes it a lot easier for ExecutorStart/Run/End hooks to get at the
query text.  Extracted from Itagaki Takahiro's pg_stat_statements patch,
with minor editorialization.
This commit is contained in:
Tom Lane
2009-01-02 20:42:00 +00:00
parent ccd31eb861
commit bbeb0bbf6b
8 changed files with 45 additions and 18 deletions

View File

@ -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.37 2009/01/01 17:23:58 momjian Exp $
* $PostgreSQL: pgsql/src/include/commands/explain.h,v 1.38 2009/01/02 20:42:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -38,8 +38,10 @@ extern void ExplainOneUtility(Node *utilityStmt, ExplainStmt *stmt,
ParamListInfo params,
TupOutputState *tstate);
extern void ExplainOnePlan(PlannedStmt *plannedstmt, ParamListInfo params,
ExplainStmt *stmt, TupOutputState *tstate);
extern void ExplainOnePlan(PlannedStmt *plannedstmt, ExplainStmt *stmt,
const char *queryString,
ParamListInfo params,
TupOutputState *tstate);
extern void ExplainPrintPlan(StringInfo str, QueryDesc *queryDesc,
bool analyze, bool verbose);