summaryrefslogtreecommitdiffstats
path: root/src/include/optimizer/appendinfo.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:17:33 +0000
commit5e45211a64149b3c659b90ff2de6fa982a5a93ed (patch)
tree739caf8c461053357daa9f162bef34516c7bf452 /src/include/optimizer/appendinfo.h
parentInitial commit. (diff)
downloadpostgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.tar.xz
postgresql-15-5e45211a64149b3c659b90ff2de6fa982a5a93ed.zip
Adding upstream version 15.5.upstream/15.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/include/optimizer/appendinfo.h')
-rw-r--r--src/include/optimizer/appendinfo.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/include/optimizer/appendinfo.h b/src/include/optimizer/appendinfo.h
new file mode 100644
index 0000000..fc808dc
--- /dev/null
+++ b/src/include/optimizer/appendinfo.h
@@ -0,0 +1,50 @@
+/*-------------------------------------------------------------------------
+ *
+ * appendinfo.h
+ * Routines for mapping expressions between append rel parent(s) and
+ * children
+ *
+ * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/optimizer/appendinfo.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef APPENDINFO_H
+#define APPENDINFO_H
+
+#include "nodes/pathnodes.h"
+#include "utils/relcache.h"
+
+extern AppendRelInfo *make_append_rel_info(Relation parentrel,
+ Relation childrel,
+ Index parentRTindex, Index childRTindex);
+extern Node *adjust_appendrel_attrs(PlannerInfo *root, Node *node,
+ int nappinfos, AppendRelInfo **appinfos);
+extern Node *adjust_appendrel_attrs_multilevel(PlannerInfo *root, Node *node,
+ Relids child_relids,
+ Relids top_parent_relids);
+extern Relids adjust_child_relids(Relids relids, int nappinfos,
+ AppendRelInfo **appinfos);
+extern Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids,
+ Relids child_relids,
+ Relids top_parent_relids);
+extern List *adjust_inherited_attnums(List *attnums, AppendRelInfo *context);
+extern List *adjust_inherited_attnums_multilevel(PlannerInfo *root,
+ List *attnums,
+ Index child_relid,
+ Index top_parent_relid);
+extern void get_translated_update_targetlist(PlannerInfo *root, Index relid,
+ List **processed_tlist,
+ List **update_colnos);
+extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root,
+ Relids relids, int *nappinfos);
+extern void add_row_identity_var(PlannerInfo *root, Var *rowid_var,
+ Index rtindex, const char *rowid_name);
+extern void add_row_identity_columns(PlannerInfo *root, Index rtindex,
+ RangeTblEntry *target_rte,
+ Relation target_relation);
+extern void distribute_row_identity_vars(PlannerInfo *root);
+
+#endif /* APPENDINFO_H */