Skip to content

Commit 8f446b9

Browse files
committed
pathman: fix original hook invokation
1 parent 611019f commit 8f446b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/pg_pathman/pg_pathman.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,11 @@ pathman_set_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, Ran
446446
int first_child_relid = 0;
447447

448448
if (!pg_pathman_enable)
449-
return;
449+
goto original_hook;
450450

451451
/* This works only for SELECT queries */
452452
if (root->parse->commandType != CMD_SELECT || !inheritance_disabled)
453-
return;
453+
goto original_hook;
454454

455455
/* Lookup partitioning information for parent relation */
456456
prel = get_pathman_relation_info(rte->relid, &found);
@@ -576,6 +576,8 @@ pathman_set_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, Ran
576576
set_append_rel_size(root, rel, rti, rte);
577577
}
578578

579+
original_hook:
580+
579581
/* Invoke original hook if needed */
580582
if (set_rel_pathlist_hook_original != NULL)
581583
{

0 commit comments

Comments
 (0)