Skip to content

Commit ac994a6

Browse files
committed
Allow use parameters in target list having aggregates in functions.
1 parent 6c93fe8 commit ac994a6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/parser/analyze.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.28 1997/05/08 02:45:53 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.29 1997/07/30 04:42:26 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -2369,7 +2369,8 @@ exprIsAggOrGroupCol(Node *expr, List *groupClause)
23692369
{
23702370
List *gl;
23712371

2372-
if ( expr == NULL || IsA (expr, Const) || IsA (expr, Aggreg) )
2372+
if ( expr == NULL || IsA (expr, Const) ||
2373+
IsA (expr, Param) || IsA (expr, Aggreg) )
23732374
return TRUE;
23742375

23752376
foreach (gl, groupClause)
@@ -2403,7 +2404,7 @@ tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause)
24032404
Node *expr = tle->expr;
24042405
List *gl;
24052406

2406-
if ( expr == NULL || IsA (expr, Const) )
2407+
if ( expr == NULL || IsA (expr, Const) || IsA (expr, Param) )
24072408
return TRUE;
24082409

24092410
foreach (gl, groupClause)

0 commit comments

Comments
 (0)