mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Implement the FILTER clause for aggregate function calls.
This is SQL-standard with a few extensions, namely support for subqueries and outer references in clause expressions. catversion bump due to change in Aggref and WindowFunc. David Fetter, reviewed by Dean Rasheed.
This commit is contained in:
@ -4410,6 +4410,8 @@ ExecInitExpr(Expr *node, PlanState *parent)
|
||||
|
||||
astate->args = (List *) ExecInitExpr((Expr *) aggref->args,
|
||||
parent);
|
||||
astate->aggfilter = ExecInitExpr(aggref->aggfilter,
|
||||
parent);
|
||||
|
||||
/*
|
||||
* Complain if the aggregate's arguments contain any
|
||||
@ -4448,6 +4450,8 @@ ExecInitExpr(Expr *node, PlanState *parent)
|
||||
|
||||
wfstate->args = (List *) ExecInitExpr((Expr *) wfunc->args,
|
||||
parent);
|
||||
wfstate->aggfilter = ExecInitExpr(wfunc->aggfilter,
|
||||
parent);
|
||||
|
||||
/*
|
||||
* Complain if the windowfunc's arguments contain any
|
||||
|
Reference in New Issue
Block a user