1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Tweak palloc/repalloc to allow zero bytes to be requested, as per recent

proposal.  Eliminate several dozen now-unnecessary hacks to avoid palloc(0).
(It's likely there are more that I didn't find.)
This commit is contained in:
Tom Lane
2004-06-05 19:48:09 +00:00
parent 24a1e20f14
commit c3a153afed
19 changed files with 113 additions and 113 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.162 2004/06/01 03:28:41 tgl Exp $
* $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.163 2004/06/05 19:48:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -2129,8 +2129,6 @@ ExecEvalRow(RowExprState *rstate,
/* Allocate workspace */
nargs = list_length(rstate->args);
if (nargs == 0) /* avoid palloc(0) if no fields */
nargs = 1;
values = (Datum *) palloc(nargs * sizeof(Datum));
nulls = (char *) palloc(nargs * sizeof(char));