File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/backend/optimizer/util Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.81 2001/02/12 18:46:40 momjian Exp $
11
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.82 2001/03/08 01:49:01 tgl Exp $
12
12
*
13
13
* HISTORY
14
14
* AUTHOR DATE MAJOR EVENT
@@ -542,6 +542,14 @@ check_subplans_for_ungrouped_vars_walker(Node *node,
542
542
if (node == NULL )
543
543
return false;
544
544
545
+ /*
546
+ * If we find an aggregate function, do not recurse into its
547
+ * arguments. Subplans invoked within aggregate calls are allowed
548
+ * to receive ungrouped variables.
549
+ */
550
+ if (IsA (node , Aggref ))
551
+ return false;
552
+
545
553
/*
546
554
* We can ignore Vars other than in subplan args lists, since the
547
555
* parser already checked 'em.
You can’t perform that action at this time.
0 commit comments