Skip to content

Commit 2730eb9

Browse files
committed
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...
1 parent 66d8165 commit 2730eb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pl/plpgsql/src/pl_exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.126 2004/12/21 18:33:35 tgl Exp $
6+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.127 2005/01/13 23:07:34 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -3606,7 +3606,7 @@ exec_eval_simple_expr(PLpgSQL_execstate *estate,
36063606
* have more than one active param list.
36073607
*/
36083608
paramLI = (ParamListInfo)
3609-
MemoryContextAllocZero(econtext->ecxt_per_tuple_memory,
3609+
MemoryContextAlloc(econtext->ecxt_per_tuple_memory,
36103610
(expr->nparams + 1) * sizeof(ParamListInfoData));
36113611

36123612
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy