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

Commit77ee808

Browse files
committed
bugfix: check that variable is the partitioning key
1 parentd874c6b commit77ee808

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎pg_pathman.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,11 +1447,9 @@ handle_arrexpr(const ScalarArrayOpExpr *expr, WalkerContext *context)
14471447
result->orig= (constNode*)expr;
14481448
result->args=NIL;
14491449

1450-
if (varnode==NULL|| !IsA(varnode,Var))
1451-
{
1452-
result->rangeset=list_make1_irange(make_irange(0,prel->children_count-1, true));
1453-
returnresult;
1454-
}
1450+
/* If variable is not the partition key then skip it */
1451+
if (!varnode|| !IsA(varnode,Var)|| ((Var*)varnode)->varattno!=prel->attnum)
1452+
gotohandle_arrexpr_return;
14551453

14561454
if (arraynode&&IsA(arraynode,Const)&&
14571455
!((Const*)arraynode)->constisnull)
@@ -1491,6 +1489,7 @@ handle_arrexpr(const ScalarArrayOpExpr *expr, WalkerContext *context)
14911489
returnresult;
14921490
}
14931491

1492+
handle_arrexpr_return:
14941493
result->rangeset=list_make1_irange(make_irange(0,prel->children_count-1, true));
14951494
returnresult;
14961495
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp