diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-01-02 20:42:00 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-01-02 20:42:00 +0000 |
commit | bbeb0bbf6b3e5fdb7cff1a87885f43139ace5c4b (patch) | |
tree | 61f8c7f089cc1e35f20b76831bd388848c212799 /src/backend/executor/functions.c | |
parent | ccd31eb861e727671e4a771d4bcc37f1179caec9 (diff) | |
download | postgresql-bbeb0bbf6b3e5fdb7cff1a87885f43139ace5c4b.tar.gz postgresql-bbeb0bbf6b3e5fdb7cff1a87885f43139ace5c4b.zip |
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.
Diffstat (limited to 'src/backend/executor/functions.c')
-rw-r--r-- | src/backend/executor/functions.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index a2eac5af8b4..a8673b1f607 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.131 2009/01/01 17:23:41 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/functions.c,v 1.132 2009/01/02 20:42:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -411,11 +411,13 @@ postquel_start(execution_state *es, SQLFunctionCachePtr fcache) if (IsA(es->stmt, PlannedStmt)) es->qd = CreateQueryDesc((PlannedStmt *) es->stmt, + fcache->src, snapshot, InvalidSnapshot, dest, fcache->paramLI, false); else es->qd = CreateUtilityQueryDesc(es->stmt, + fcache->src, snapshot, dest, fcache->paramLI); |