1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +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

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.203 2009/01/01 17:23:42 momjian Exp $
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.204 2009/01/02 20:42:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1791,6 +1791,7 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
snap = InvalidSnapshot;
qdesc = CreateQueryDesc((PlannedStmt *) stmt,
plansource->query_string,
snap, crosscheck_snapshot,
dest,
paramLI, false);