diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-05 19:48:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-05 19:48:09 +0000 |
commit | c3a153afed84e29dac664bdc6123724a9e3a906f (patch) | |
tree | 8249c3dd76ddc9874656ec36f763227327c0a70e /src/backend/optimizer/prep/prepunion.c | |
parent | 24a1e20f146f3b4b88f0f5189a7631c511796310 (diff) |
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.)
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index abc5af7784f..0e1b4f2aec0 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.113 2004/06/05 01:55:04 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.114 2004/06/05 19:48:08 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -538,9 +538,9 @@ generate_append_tlist(List *colTypes, bool flag, * First extract typmods to use. * * If the inputs all agree on type and typmod of a particular column, use - * that typmod; else use -1. (+1 here in case of zero columns.) + * that typmod; else use -1. */ - colTypmods = (int32 *) palloc(list_length(colTypes) * sizeof(int32) + 1); + colTypmods = (int32 *) palloc(list_length(colTypes) * sizeof(int32)); foreach(planl, input_plans) { |