From: Tom Lane Date: Thu, 13 Jan 2005 23:07:34 +0000 (+0000) Subject: Change exec_eval_simple_expr's param list allocation call from X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=eeb4decdf3a0e965c2b3d8141a681d9aeb401387;p=users%2Fbernd%2Fpostgres.git 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... --- diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index d81da83747..19a1c6e767 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -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)); /*