Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 164caa3

Browse files
committed
System neglected to complain about ungrouped variables passed to
sublinks when outer query contained aggregates but no GROUP clause.
1 parent 74f0b61 commit 164caa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.89 2000/09/12 21:06:54 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.90 2000/09/25 18:09:28 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -184,7 +184,7 @@ subquery_planner(Query *parse, double tuple_fraction)
184184
parse->qual = SS_process_sublinks(parse->qual);
185185
parse->havingQual = SS_process_sublinks(parse->havingQual);
186186

187-
if (parse->groupClause != NIL)
187+
if (parse->groupClause != NIL || parse->hasAggs)
188188
{
189189

190190
/*

0 commit comments

Comments
 (0)