diff options
| author | Tom Lane | 2006-09-06 20:40:48 +0000 |
|---|---|---|
| committer | Tom Lane | 2006-09-06 20:40:48 +0000 |
| commit | 5983a1aaa9137367c834e0ff84cd8d4d48b326b2 (patch) | |
| tree | 3425eaf290ad8ee4d565551d45e60df514f67e55 /src/pl | |
| parent | 389870b256bc65f088a7f9a4ea4a88c01242c551 (diff) | |
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/pl')
| -rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index dedba15117..7b350caf15 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.177 2006/08/27 23:47:58 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.178 2006/09/06 20:40:48 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3958,6 +3958,7 @@ exec_eval_simple_expr(PLpgSQL_execstate *estate, ParamExternData *prm = ¶mLI->params[i]; PLpgSQL_datum *datum = estate->datums[expr->params[i]]; + prm->pflags = 0; exec_eval_datum(estate, datum, expr->plan_argtypes[i], &prm->ptype, &prm->value, &prm->isnull); |
