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

Commiteb00bdf

Browse files
committed
Insert a test for missing targetlist entry in replace_agg_clause.
1 parent26db818 commiteb00bdf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 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.41 1999/04/19 01:43:12 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.42 1999/04/26 00:37:46 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -599,9 +599,11 @@ replace_result_clause(Node *clause,
599599
*/
600600
subplanVar=match_varid((Var*)clause,subplanTargetList);
601601

602+
if (!subplanVar)
603+
elog(ERROR,"replace_result_clause: variable not in target list");
604+
602605
/*
603606
* Change the varno & varattno fields of the var node.
604-
*
605607
*/
606608
((Var*)clause)->varno= (Index)OUTER;
607609
((Var*)clause)->varattno=subplanVar->resdom->resno;
@@ -754,10 +756,11 @@ replace_agg_clause(Node *clause, List *subplanTargetList)
754756
*/
755757
subplanVar=match_varid((Var*)clause,subplanTargetList);
756758

759+
if (!subplanVar)
760+
elog(ERROR,"replace_agg_clause: variable not in target list");
761+
757762
/*
758763
* Change the varno & varattno fields of the var node.
759-
* Note we assume match_varid() will succeed ...
760-
*
761764
*/
762765
((Var*)clause)->varattno=subplanVar->resdom->resno;
763766

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp