290
290
* If both GROUP BY and ORDER BY are specified, we will need two
291
291
* levels of sort --- and, therefore, certainly need to read all the
294
294
* specification not compatible with the GROUP BY.
296
296
if (!pathkeys_contained_in(root->sort_pathkeys, root->group_pathkeys) ||
297
297
!pathkeys_contained_in(root->distinct_pathkeys, root->group_pathkeys) ||
301
301
else if (parse->hasAggs || root->hasHavingQual)