mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Give pull_var_clause() reject/recurse/return behavior for WindowFuncs too.
All along, this function should have treated WindowFuncs in a manner similar to Aggrefs, ie with an option whether or not to recurse into them. By not considering the case, it was always recursing, which is OK for most callers (although I suspect that the case in prepare_sort_from_pathkeys might represent a bug). But now we need return-without-recursing behavior as well. There are also more than a few callers that should never see a WindowFunc, and now we'll get some error checking on that.
This commit is contained in:
@ -3329,6 +3329,7 @@ estimate_num_groups(PlannerInfo *root, List *groupExprs, double input_rows,
|
||||
*/
|
||||
varshere = pull_var_clause(groupexpr,
|
||||
PVC_RECURSE_AGGREGATES |
|
||||
PVC_RECURSE_WINDOWFUNCS |
|
||||
PVC_RECURSE_PLACEHOLDERS);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user