aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeAgg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r--src/backend/executor/nodeAgg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 31609c60fc6..1fdfbd1eea7 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -3574,6 +3574,11 @@ ExecInitAgg(Agg *node, EState *estate, int eflags)
{
int length = phasedata->gset_lengths[i];
+ /* nothing to do for empty grouping set */
+ if (length == 0)
+ continue;
+
+ /* if we already had one of this length, it'll do */
if (phasedata->eqfunctions[length - 1] != NULL)
continue;