diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2020-11-24 10:45:00 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2020-11-24 10:45:00 +0200 |
commit | 0a2bc5d61e713e3fe72438f020eea5fcc90b0f0b (patch) | |
tree | 8f630f828fa6bbfb5984f037118211cd68d8a50e /src/backend/parser/parse_func.c | |
parent | e522024bd8dd28a0f13dcccfd39170698f45c939 (diff) | |
download | postgresql-0a2bc5d61e713e3fe72438f020eea5fcc90b0f0b.tar.gz postgresql-0a2bc5d61e713e3fe72438f020eea5fcc90b0f0b.zip |
Move per-agg and per-trans duplicate finding to the planner.
This has the advantage that the cost estimates for aggregates can count
the number of calls to transition and final functions correctly.
Bump catalog version, because views can contain Aggrefs.
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/b2e3536b-1dbc-8303-c97e-89cb0b4a9a48%40iki.fi
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r-- | src/backend/parser/parse_func.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 8b4e3ca5e11..23ac2a2fe65 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -769,6 +769,8 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, aggref->aggkind = aggkind; /* agglevelsup will be set by transformAggregateCall */ aggref->aggsplit = AGGSPLIT_SIMPLE; /* planner might change this */ + aggref->aggno = -1; /* planner will set aggno and aggtransno */ + aggref->aggtransno = -1; aggref->location = location; /* |