diff options
author | Robert Haas | 2017-08-15 14:49:06 +0000 |
---|---|---|
committer | Robert Haas | 2017-08-15 14:49:06 +0000 |
commit | 480f1f4329f1bf8bfbbcda8ed233851e1b110ad4 (patch) | |
tree | 963b28125c8808fad10a0b8aa5ba2a82692ccb03 /src/include/optimizer/prep.h | |
parent | d57929afc7063431f80a0ac4c510fc39aacd22e6 (diff) |
Teach adjust_appendrel_attrs(_multilevel) to do multiple translations.
Currently, child relations are always base relations, so when we
translate parent relids to child relids, we only need to translate
a singler relid. However, the proposed partition-wise join feature
will create child joins, which will mean we need to translate a set
of parent relids to the corresponding child relids. This is
preliminary refactoring to make that possible.
Ashutosh Bapat. Review and testing of the larger patch set of which
this is a part by Amit Langote, Rajkumar Raghuwanshi, Rafia Sabih,
Thomas Munro, Dilip Kumar, and me. Some adjustments, mostly
cosmetic, by me.
Discussion: http://postgr.es/m/CA+TgmobQK80vtXjAsPZWWXd7c8u13G86gmuLupN+uUJjA+i4nA@mail.gmail.com
Diffstat (limited to 'src/include/optimizer/prep.h')
-rw-r--r-- | src/include/optimizer/prep.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index faad46b5e4e..4be0afd5660 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -53,9 +53,13 @@ extern RelOptInfo *plan_set_operations(PlannerInfo *root); extern void expand_inherited_tables(PlannerInfo *root); extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node, - AppendRelInfo *appinfo); + int nappinfos, AppendRelInfo **appinfos); extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node, - RelOptInfo *child_rel); + Relids child_relids, + Relids top_parent_relids); + +extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root, + Relids relids, int *nappinfos); #endif /* PREP_H */ |