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

Commitbbb1178

Browse files
committed
bugfix: we cannot use an outer path that is parameterized by the inner rel
1 parent777917d commitbbb1178

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎src/hooks.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
#include"utils/lsyscache.h"
2929

3030

31+
/* Borrowed from joinpath.c */
32+
#definePATH_PARAM_BY_REL(path,rel) \
33+
((path)->param_info && bms_overlap(PATH_REQ_OUTER(path), (rel)->relids))
34+
35+
3136
set_join_pathlist_hook_typeset_join_pathlist_next=NULL;
3237
set_rel_pathlist_hook_typeset_rel_pathlist_hook_next=NULL;
3338
planner_hook_typeplanner_hook_next=NULL;
@@ -123,6 +128,12 @@ pathman_join_pathlist_hook(PlannerInfo *root,
123128

124129
/* Select cheapest path for outerrel */
125130
outer=outerrel->cheapest_total_path;
131+
132+
/* We cannot use an outer path that is parameterized by the inner rel */
133+
if (PATH_PARAM_BY_REL(outer,innerrel))
134+
continue;
135+
136+
/* Wrap 'outer' in unique path if needed */
126137
if (saved_jointype==JOIN_UNIQUE_OUTER)
127138
{
128139
outer= (Path*)create_unique_path(root,outerrel,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp