Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f57641

Browse files
committed
Fix replace_agg_clause() for unary operators.
1 parent8f846a3 commit0f57641

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/backend/optimizer/plan/setrefs.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.3 1997/04/24 15:54:52 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.4 1997/06/12 17:26:15 vadim Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -690,10 +690,13 @@ replace_agg_clause(Node *clause, List *subplanTargetList)
690690
* This is an operator. Recursively call this routine
691691
* for both its left and right operands
692692
*/
693-
replace_agg_clause((Node*)get_leftop((Expr*)clause),
694-
subplanTargetList);
695-
replace_agg_clause((Node*)get_rightop((Expr*)clause),
696-
subplanTargetList);
693+
Node*left= (Node*)get_leftop((Expr*)clause);
694+
Node*right= (Node*)get_rightop((Expr*)clause);
695+
696+
if (left!= (Node*)NULL )
697+
replace_agg_clause(left,subplanTargetList);
698+
if (right!= (Node*)NULL )
699+
replace_agg_clause(right,subplanTargetList);
697700
}elseif (IsA(clause,Param)||IsA(clause,Const)) {
698701
/* do nothing! */
699702
}else {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp