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

Commit28c60fe

Browse files
committed
move next hook call in rel_pathlist_hook, check for the enable_pickyappend flag
1 parent7e7210c commit28c60fe

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

‎hooks.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,16 @@ pathman_join_pathlist_hook(PlannerInfo *root,
123123
void
124124
pathman_rel_pathlist_hook(PlannerInfo*root,RelOptInfo*rel,Indexrti,RangeTblEntry*rte)
125125
{
126-
PartRelationInfo*prel=NULL;
127-
RelOptInfo**new_rel_array;
128-
RangeTblEntry**new_rte_array;
129-
intlen;
130-
boolfound;
131-
intfirst_child_relid=0;
126+
PartRelationInfo*prel=NULL;
127+
RangeTblEntry**new_rte_array;
128+
RelOptInfo**new_rel_array;
129+
boolfound;
130+
intlen;
131+
intfirst_child_relid=0;
132+
133+
/* Invoke original hook if needed */
134+
if (set_rel_pathlist_hook_next!=NULL)
135+
set_rel_pathlist_hook_next(root,rel,rti,rte);
132136

133137
if (!pg_pathman_enable)
134138
return;
@@ -262,6 +266,9 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
262266
set_append_rel_pathlist(root,rel,rti,rte,pathkeyAsc,pathkeyDesc);
263267
set_append_rel_size(root,rel,rti,rte);
264268

269+
if (!pg_pathman_enable_pickyappend)
270+
return;
271+
265272
foreach (lc,rel->pathlist)
266273
{
267274
AppendPath*cur_path= (AppendPath*)lfirst(lc);
@@ -277,7 +284,7 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
277284
{
278285
continue;
279286
}
280-
287+
281288
foreach (subpath_cell,cur_path->subpaths)
282289
{
283290
Path*subpath= (Path*)lfirst(subpath_cell);
@@ -323,9 +330,4 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
323330
add_path(rel,inner_path);
324331
}
325332
}
326-
327-
/* Invoke original hook if needed */
328-
if (set_rel_pathlist_hook_next!=NULL)
329-
set_rel_pathlist_hook_next(root,rel,rti,rte);
330333
}
331-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp