aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-01-13 23:07:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-01-13 23:07:34 +0000
commit2730eb9ae4f9483a18cbc6168c651318b717c37f (patch)
treeaec06bc217d9acf7d03e581443c1d6f6e544ec5d /src
parent66d8165a8bd63ae30d9a35f33f1c5100b979cd26 (diff)
downloadpostgresql-2730eb9ae4f9483a18cbc6168c651318b717c37f.tar.gz
postgresql-2730eb9ae4f9483a18cbc6168c651318b717c37f.zip
Change exec_eval_simple_expr's param list allocation call from
MemoryContextAllocZero back to MemoryContextAlloc, same as it was in 7.4. The zeroing is unnecessary since all the meaningful fields are filled in just below. I had made it do that out of neatnik-ism, but some testing with an example provided by Pavel Stehule showed that the zeroing was accounting for about 5% of the runtime in a compute-intensive plpgsql function. That seems a bit high of a price for neatnik-ism...
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index 90dfc3c0d14..bd2c6a00bed 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.126 2004/12/21 18:33:35 tgl Exp $
+ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.127 2005/01/13 23:07:34 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -3606,7 +3606,7 @@ exec_eval_simple_expr(PLpgSQL_execstate *estate,
* have more than one active param list.
*/
paramLI = (ParamListInfo)
- MemoryContextAllocZero(econtext->ecxt_per_tuple_memory,
+ MemoryContextAlloc(econtext->ecxt_per_tuple_memory,
(expr->nparams + 1) * sizeof(ParamListInfoData));
/*