diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-27 19:52:07 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-07-27 19:52:07 +0000 |
commit | 108fe4730152058f9b576969d08898b39bf7fc38 (patch) | |
tree | 15a7d14be8267612cdfed4de8af86993b37f9997 /src/backend/executor/execQual.c | |
parent | c2d1138351f89d0705f71cf935a56b9a2e28ed24 (diff) | |
download | postgresql-108fe4730152058f9b576969d08898b39bf7fc38.tar.gz postgresql-108fe4730152058f9b576969d08898b39bf7fc38.zip |
Aggregate functions now support multiple input arguments. I also took
the opportunity to treat COUNT(*) as a zero-argument aggregate instead
of the old hack that equated it to COUNT(1); this is materially cleaner
(no more weird ANYOID cases) and ought to be at least a tiny bit faster.
Original patch by Sergey Koposov; review, documentation, simple regression
tests, pg_dump and psql support by moi.
Diffstat (limited to 'src/backend/executor/execQual.c')
-rw-r--r-- | src/backend/executor/execQual.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index fc80472adee..7f341940d67 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.192 2006/07/14 14:52:19 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.193 2006/07/27 19:52:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3174,10 +3174,11 @@ ExecInitExpr(Expr *node, PlanState *parent) aggstate->aggs = lcons(astate, aggstate->aggs); naggs = ++aggstate->numaggs; - astate->target = ExecInitExpr(aggref->target, parent); + astate->args = (List *) ExecInitExpr((Expr *) aggref->args, + parent); /* - * Complain if the aggregate's argument contains any + * Complain if the aggregate's arguments contain any * aggregates; nested agg functions are semantically * nonsensical. (This should have been caught earlier, * but we defend against it here anyway.) |