8000 small fixes & new TODOs · postgrespro/pg_pathman@d6eeacd · GitHub
[go: up one dir, main page]

Skip to content
  • Insights
  • Commit d6eeacd

    Browse files
    committed
    small fixes & new TODOs
    1 parent ed842da commit d6eeacd

    File tree

    1 file changed

    +20
    -15
    lines changed

    1 file changed

    +20
    -15
    lines changed

    src/hooks.c

    Lines changed: 20 additions & 15 deletions
    Original file line numberDiff line numberDiff line change
    @@ -147,7 +147,8 @@ pathman_join_pathlist_hook(PlannerInfo *root,
    147147
    if (saved_jointype == JOIN_UNIQUE_INNER)
    148148
    return; /* No way to do this with a parameterized inner path */
    149149

    150-
    #if defined PGPRO_VERSION && PG_VERSION_NUM >= 90603
    150+
    /* TODO: create macro initial_cost_nestloop_compat() */
    151+
    #if defined(PGPRO_VERSION) && PG_VERSION_NUM >= 90603
    151152
    initial_cost_nestloop(root, &workspace, jointype,
    152153
    outer, inner, /* built paths */
    153154
    extra);
    @@ -159,20 +160,6 @@ pathman_join_pathlist_hook(PlannerInfo *root,
    159160

    160161
    pathkeys = build_join_pathkeys(root, joinrel, jointype, outer->pathkeys);
    161162

    162-
    #if defined PGPRO_VERSION && PG_VERSION_NUM >= 90603
    163-
    nest_path = create_nestloop_path(root, joinrel, jointype, &workspace,
    164-
    extra, outer, inner,
    165-
    extra->restrictlist,
    166-
    pathkeys,
    167-
    calc_nestloop_required_outer(outer, inner));
    168-
    #else
    169-
    nest_path = create_nestloop_path(root, joinrel, jointype, &workspace,
    170-
    extra->sjinfo, &extra->semifactors,
    171-
    outer, inner, extra->restrictlist,
    172-
    pathkeys,
    173-
    calc_nestloop_required_outer(outer, inner));
    174-
    #endif
    175-
    176163
    /* Discard all clauses that are to be evaluated by 'inner' */
    177164
    foreach (rinfo_lc, extra->restrictlist)
    178165
    {
    @@ -183,6 +170,24 @@ pathman_join_pathlist_hook(PlannerInfo *root,
    183170
    filtered_joinclauses = lappend(filtered_joinclauses, rinfo);
    184171
    }
    185172

    173+
    /* TODO: create macro create_nestloop_path_compat() */
    174+
    #if defined(PGPRO_VERSION) && PG_VERSION_NUM >= 90603
    175+
    nest_path = create_nestloop_path(root, joinrel, jointype, &workspace,
    176+
    extra,
    177+
    outer, inner,
    178+
    filtered_joinclauses,
    179+
    pathkeys,
    180+
    calc_nestloop_required_outer(outer, inner));
    181+
    #else
    182+
    nest_path = create_nestloop_path(root, joinrel, jointype, &workspace,
    183+
    extra->sjinfo,
    184+
    &extra->semifactors,
    185+
    outer, inner,
    186+
    filtered_joinclauses,
    187+
    pathkeys,
    188+
    calc_nestloop_required_outer(outer, inner));
    189+
    #endif
    190+
    186191
    /*
    187192
    * Override 'rows' value produced by standard estimator.
    188193
    * Currently we use get_parameterized_joinrel_size() since

    0 commit comments

    Comments
     (0)
    0