PostgreSQL Source Code  git master
appendinfo.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * appendinfo.h
4  * Routines for mapping expressions between append rel parent(s) and
5  * children
6  *
7  * Portions Copyright (c) 1996-2021, 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 
21  Relation childrel,
22  Index parentRTindex, Index childRTindex);
23 extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
24  int nappinfos, AppendRelInfo **appinfos);
26  Relids child_relids,
27  Relids top_parent_relids);
28 extern Relids adjust_child_relids(Relids relids, int nappinfos,
29  AppendRelInfo **appinfos);
31  Relids child_relids,
32  Relids top_parent_relids);
33 extern List *adjust_inherited_attnums(List *attnums, AppendRelInfo *context);
35  List *attnums,
36  Index child_relid,
37  Index top_parent_relid);
38 extern void get_translated_update_targetlist(PlannerInfo *root, Index relid,
39  List **processed_tlist,
40  List **update_colnos);
42  Relids relids, int *nappinfos);
43 extern void add_row_identity_var(PlannerInfo *root, Var *rowid_var,
44  Index rtindex, const char *rowid_name);
45 extern void add_row_identity_columns(PlannerInfo *root, Index rtindex,
46  RangeTblEntry *target_rte,
47  Relation target_relation);
48 extern void distribute_row_identity_vars(PlannerInfo *root);
49 
50 #endif /* APPENDINFO_H */
Node * adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node, Relids child_relids, Relids top_parent_relids)
Definition: appendinfo.c:488
Definition: nodes.h:536
Definition: primnodes.h:186
Node * adjust_appendrel_attrs(PlannerInfo *root, Node *node, int nappinfos, AppendRelInfo **appinfos)
Definition: appendinfo.c:195
List * adjust_inherited_attnums(List *attnums, AppendRelInfo *context)
Definition: appendinfo.c:614
List * adjust_inherited_attnums_multilevel(PlannerInfo *root, List *attnums, Index child_relid, Index top_parent_relid)
Definition: appendinfo.c:648
void add_row_identity_var(PlannerInfo *root, Var *rowid_var, Index rtindex, const char *rowid_name)
Definition: appendinfo.c:763
Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids, Relids child_relids, Relids top_parent_relids)
Definition: appendinfo.c:562
unsigned int Index
Definition: c.h:549
void distribute_row_identity_vars(PlannerInfo *root)
Definition: appendinfo.c:937
AppendRelInfo ** find_appinfos_by_relids(PlannerInfo *root, Relids relids, int *nappinfos)
Definition: appendinfo.c:715
Relids adjust_child_relids(Relids relids, int nappinfos, AppendRelInfo **appinfos)
Definition: appendinfo.c:527
AppendRelInfo * make_append_rel_info(Relation parentrel, Relation childrel, Index parentRTindex, Index childRTindex)
Definition: appendinfo.c:50
void add_row_identity_columns(PlannerInfo *root, Index rtindex, RangeTblEntry *target_rte, Relation target_relation)
Definition: appendinfo.c:857
Definition: pg_list.h:50
void get_translated_update_targetlist(PlannerInfo *root, Index relid, List **processed_tlist, List **update_colnos)
Definition: appendinfo.c:676