diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-06 20:40:48 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-09-06 20:40:48 +0000 |
commit | 5983a1aaa9137367c834e0ff84cd8d4d48b326b2 (patch) | |
tree | 3425eaf290ad8ee4d565551d45e60df514f67e55 /src/backend/commands/explain.c | |
parent | 389870b256bc65f088a7f9a4ea4a88c01242c551 (diff) | |
download | postgresql-5983a1aaa9137367c834e0ff84cd8d4d48b326b2.tar.gz postgresql-5983a1aaa9137367c834e0ff84cd8d4d48b326b2.zip |
Change processing of extended-Query mode so that an unnamed statement
that has parameters is always planned afresh for each Bind command,
treating the parameter values as constants in the planner. This removes
the performance penalty formerly often paid for using out-of-line
parameters --- with this definition, the planner can do constant folding,
LIKE optimization, etc. After a suggestion by Andrew@supernews.
Diffstat (limited to 'src/backend/commands/explain.c')
-rw-r--r-- | src/backend/commands/explain.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 5787aa413e7..48db000ea9b 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -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.150 2006/08/02 01:59:45 joe Exp $ + * $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.151 2006/09/06 20:40:47 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -191,7 +191,7 @@ ExplainOneQuery(Query *query, ExplainStmt *stmt, ParamListInfo params, } /* plan the query */ - plan = planner(query, isCursor, cursorOptions, NULL); + plan = planner(query, isCursor, cursorOptions, params); /* * Update snapshot command ID to ensure this query sees results of any |