pgsql: Fix failure to detect some cases of improperly-nested aggregates

2023-03-13 Thread Tom Lane
Fix failure to detect some cases of improperly-nested aggregates. check_agg_arguments_walker() supposed that it needn't descend into the arguments of a lower-level aggregate function, but this is just wrong in the presence of multiple levels of sub-select. The oversight would lead to executor fai

pgsql: Fix failure to detect some cases of improperly-nested aggregates

2023-03-13 Thread Tom Lane
Fix failure to detect some cases of improperly-nested aggregates. check_agg_arguments_walker() supposed that it needn't descend into the arguments of a lower-level aggregate function, but this is just wrong in the presence of multiple levels of sub-select. The oversight would lead to executor fai

pgsql: Fix failure to detect some cases of improperly-nested aggregates

2023-03-13 Thread Tom Lane
Fix failure to detect some cases of improperly-nested aggregates. check_agg_arguments_walker() supposed that it needn't descend into the arguments of a lower-level aggregate function, but this is just wrong in the presence of multiple levels of sub-select. The oversight would lead to executor fai

pgsql: Fix failure to detect some cases of improperly-nested aggregates

2023-03-13 Thread Tom Lane
Fix failure to detect some cases of improperly-nested aggregates. check_agg_arguments_walker() supposed that it needn't descend into the arguments of a lower-level aggregate function, but this is just wrong in the presence of multiple levels of sub-select. The oversight would lead to executor fai

pgsql: Fix failure to detect some cases of improperly-nested aggregates

2023-03-13 Thread Tom Lane
Fix failure to detect some cases of improperly-nested aggregates. check_agg_arguments_walker() supposed that it needn't descend into the arguments of a lower-level aggregate function, but this is just wrong in the presence of multiple levels of sub-select. The oversight would lead to executor fai

pgsql: Fix failure to detect some cases of improperly-nested aggregates

2023-03-13 Thread Tom Lane
Fix failure to detect some cases of improperly-nested aggregates. check_agg_arguments_walker() supposed that it needn't descend into the arguments of a lower-level aggregate function, but this is just wrong in the presence of multiple levels of sub-select. The oversight would lead to executor fai