提交 ac994a69 编写于 作者: V Vadim B. Mikheev

Allow use parameters in target list having aggregates in functions.

上级 6c93fe8f
...@@ -7,7 +7,7 @@ ...@@ -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) ...@@ -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) ...@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册