From 5983a1aaa9137367c834e0ff84cd8d4d48b326b2 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 6 Sep 2006 20:40:48 +0000 Subject: 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. --- src/backend/commands/explain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/explain.c') diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 5787aa413e..48db000ea9 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 -- cgit v1.2.1