mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Back out use of palloc0 in place if palloc/MemSet. Seems constant len
to MemSet is a performance boost.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Copyright (c) 2002, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.5 2002/11/10 07:25:13 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.6 2002/11/11 03:02:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -116,7 +116,8 @@ ExecuteQuery(ExecuteStmt *stmt, CommandDest outputDest)
|
||||
if (nargs != length(stmt->params))
|
||||
elog(ERROR, "ExecuteQuery: wrong number of arguments");
|
||||
|
||||
paramLI = (ParamListInfo) palloc0((nargs + 1) * sizeof(ParamListInfoData));
|
||||
paramLI = (ParamListInfo) palloc((nargs + 1) * sizeof(ParamListInfoData));
|
||||
MemSet(paramLI, 0, (nargs + 1) * sizeof(ParamListInfoData));
|
||||
|
||||
foreach(l, stmt->params)
|
||||
{
|
||||
|
Reference in New Issue
Block a user