aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-10-30 02:35:14 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-10-30 02:35:14 +0000
commitc60ecd8f8c576873006febb51eeb23631f032d6d (patch)
tree0242aa5cf56df88d772585e6a7349112fe88adeb
parentb021e9a1300cef6ca89b5f580f11292d5899085f (diff)
downloadpostgresql-c60ecd8f8c576873006febb51eeb23631f032d6d.tar.gz
postgresql-c60ecd8f8c576873006febb51eeb23631f032d6d.zip
Ooops ... 6.5 coding wasn't quite right anymore. Should learn
never to commit without running regress tests...
-rw-r--r--src/backend/executor/nodeAgg.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index d2002d67d49..0956af455f1 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -11,7 +11,7 @@
* SQL aggregates. (Do not expect POSTQUEL semantics.) -- ay 2/95
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.58 1999/10/30 01:18:16 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.59 1999/10/30 02:35:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -434,11 +434,15 @@ ExecAgg(Agg *node)
tupType = aggstate->csstate.css_ScanTupleSlot->ttc_tupleDescriptor;
tupValue = projInfo->pi_tupValue;
- null_array = (char *) palloc(sizeof(char) * tupType->natts);
- for (attnum = 0; attnum < tupType->natts; attnum++)
- null_array[attnum] = 'n';
- inputTuple = heap_formtuple(tupType, tupValue, null_array);
- pfree(null_array);
+ /* watch out for null input tuples, though... */
+ if (tupType && tupValue)
+ {
+ null_array = (char *) palloc(sizeof(char)*tupType->natts);
+ for (attnum = 0; attnum < tupType->natts; attnum++)
+ null_array[attnum] = 'n';
+ inputTuple = heap_formtuple(tupType, tupValue, null_array);
+ pfree(null_array);
+ }
}
}