Allow use parameters in target list having aggregates in functions.

This commit is contained in:
Vadim B. Mikheev 1997-07-30 04:42:26 +00:00
parent 6c93fe8f9d
commit ac994a69d6
1 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.28 1997/05/08 02:45:53 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.29 1997/07/30 04:42:26 vadim Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -2369,7 +2369,8 @@ exprIsAggOrGroupCol(Node *expr, List *groupClause)
{ {
List *gl; List *gl;
if ( expr == NULL || IsA (expr, Const) || IsA (expr, Aggreg) ) if ( expr == NULL || IsA (expr, Const) ||
IsA (expr, Param) || IsA (expr, Aggreg) )
return TRUE; return TRUE;
foreach (gl, groupClause) foreach (gl, groupClause)
@ -2403,7 +2404,7 @@ tleIsAggOrGroupCol(TargetEntry *tle, List *groupClause)
Node *expr = tle->expr; Node *expr = tle->expr;
List *gl; List *gl;
if ( expr == NULL || IsA (expr, Const) ) if ( expr == NULL || IsA (expr, Const) || IsA (expr, Param) )
return TRUE; return TRUE;
foreach (gl, groupClause) foreach (gl, groupClause)