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:
@ -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);
|
||||
|
Reference in New Issue
Block a user