1/*-------------------------------------------------------------------------
2 *
3 * appendinfo.h
4 * Routines for mapping expressions between append rel parent(s) and
5 * children
6 *
7 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/optimizer/appendinfo.h
11 *
12 *-------------------------------------------------------------------------
13 */
14#ifndef APPENDINFO_H
15#define APPENDINFO_H
16
17#include "nodes/pathnodes.h"
18#include "utils/relcache.h"
19
20extern AppendRelInfo *make_append_rel_info(Relation parentrel,
21 Relation childrel,
22 Index parentRTindex, Index childRTindex);
23extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
24 int nappinfos, AppendRelInfo **appinfos);
25extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node,
26 Relids child_relids,
27 Relids top_parent_relids);
28extern Relids adjust_child_relids(Relids relids, int nappinfos,
29 AppendRelInfo **appinfos);
30extern Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids,
31 Relids child_relids, Relids top_parent_relids);
32extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root,
33 Relids relids, int *nappinfos);
34
35#endif /* APPENDINFO_H */
36