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

Commitb2edbbd

Browse files
committed
Fix oversight in commitb5415e3.
While rearranging code in tidpath.c, I overlooked the fact that we oughtto check restriction_is_securely_promotable when trying to use a joinclause as a TID qual. Since tideq itself is leakproof, this wouldn'treally allow any interesting leak AFAICT, but it still seems like wehad better check it.For consistency with the corresponding logic in indxpath.c, alsocheck rinfo->pseudoconstant. I'm not sure right now that it'spossible for that to be set in a join clause, but if it were,a match couldn't be made anyway.
1 parent60d9979 commitb2edbbd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/backend/optimizer/path/tidpath.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,14 @@ BuildParameterizedTidPaths(PlannerInfo *root, RelOptInfo *rel, List *clauses)
329329
*
330330
* We currently consider only TidEqual join clauses. In principle we
331331
* might find a suitable ScalarArrayOpExpr in the rel's joininfo list,
332-
* but it seems unlikely to be worth checking for.
332+
* but it seems unlikely to be worth expending the cycles to check.
333+
* And we definitely won't find a CurrentOfExpr here. Hence, we don't
334+
* use TidQualFromRestrictInfo; but this must match that function
335+
* otherwise.
333336
*/
334-
if (!IsTidEqualClause(rinfo,rel))
337+
if (rinfo->pseudoconstant||
338+
!restriction_is_securely_promotable(rinfo,rel)||
339+
!IsTidEqualClause(rinfo,rel))
335340
continue;
336341

337342
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp