diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 13:44:03 +0000 |
commit | 293913568e6a7a86fd1479e1cff8e2ecb58d6568 (patch) | |
tree | fc3b469a3ec5ab71b36ea97cc7aaddb838423a0c /src/include/optimizer/appendinfo.h | |
parent | Initial commit. (diff) | |
download | postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.tar.xz postgresql-16-293913568e6a7a86fd1479e1cff8e2ecb58d6568.zip |
Adding upstream version 16.2.upstream/16.2
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.h | 50 |
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..a05f91f --- /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-2023, 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, + RelOptInfo *childrel, + RelOptInfo *parentrel); +extern Relids adjust_child_relids(Relids relids, int nappinfos, + AppendRelInfo **appinfos); +extern Relids adjust_child_relids_multilevel(PlannerInfo *root, Relids relids, + RelOptInfo *childrel, + RelOptInfo *parentrel); +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 *orig_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 */ |