!3325 opengauss开启继承表

Merge pull request !3325 from 雷紫薇/rel122582
This commit is contained in:
opengauss_bot
2023-12-14 01:10:54 +00:00
committed by Gitee
32 changed files with 5824 additions and 405 deletions

View File

@ -255,7 +255,7 @@ extern PlanState* ExecInitNode(Plan* node, EState* estate, int eflags);
extern Node* MultiExecProcNode(PlanState* node);
extern void ExecEndNode(PlanState* node);
extern bool NeedStubExecution(Plan* plan);
extern TupleTableSlot* FetchPlanSlot(PlanState* subPlanState, ProjectionInfo** projInfos);
extern TupleTableSlot* FetchPlanSlot(PlanState* subPlanState, ProjectionInfo** projInfos, bool isinherit);
extern long ExecGetPlanMemCost(Plan* node);

View File

@ -1505,6 +1505,7 @@ typedef struct ModifyTableState {
bool mt_done; /* are we done? */
bool isReplace;
bool isConflict;
bool isinherit;
PlanState** mt_plans; /* subplans (one per target rel) */
#ifdef PGXC
PlanState** mt_remoterels; /* per-target remote query node */

View File

@ -293,6 +293,8 @@ typedef struct Plan {
/* flag to indicate if it is controller plan node */
bool recursive_union_controller;
bool isinherit;
/* plan node id of Controller plan node, 0 for not in control */
int control_plan_nodeid;

View File

@ -338,6 +338,14 @@ typedef struct PlannerInfo {
*/
RangeTblEntry** simple_rte_array; /* rangetable as an array */
/*
* append_rel_array is the same length as the above arrays, and holds
* pointers to the corresponding AppendRelInfo entry indexed by
* child_relid, or NULL if the rel is not an appendrel child. The array
* itself is not allocated if append_rel_list is empty.
*/
struct AppendRelInfo **append_rel_array;
/*
* all_baserels is a Relids set of all base relids (but not "other"
* relids) in the query; that is, the Relids identifier of the final join
@ -829,6 +837,7 @@ typedef struct RelOptInfo {
List* joininfo; /* RestrictInfo structures for join clauses
* involving this rel */
bool has_eclass_joins; /* T means joininfo is incomplete */
Relids top_parent_relids; /* Relids of topmost parents (if "other"* rel) */
RelOrientation orientation; /* the store type of base rel */
RelstoreType relStoreLocation; /* the relation store location. */
char locator_type; /* the location type of base rel */

View File

@ -114,7 +114,7 @@ extern Path* reparameterize_path(PlannerInfo* root, Path* path, Relids required_
* prototypes for relnode.c
*/
extern void setup_simple_rel_arrays(PlannerInfo* root);
extern RelOptInfo* build_simple_rel(PlannerInfo* root, int relid, RelOptKind reloptkind);
extern RelOptInfo* build_simple_rel(PlannerInfo* root, int relid, RelOptKind reloptkind, Bitmapset *parent = NULL);
extern RelOptInfo* find_base_rel(PlannerInfo* root, int relid);
extern RelOptInfo* find_join_rel(PlannerInfo* root, Relids relids);
extern void remove_join_rel(PlannerInfo *root, RelOptInfo *rel);

View File

@ -104,7 +104,9 @@ extern void make_inh_translation_list(
extern Bitmapset* translate_col_privs(const Bitmapset* parent_privs, List* translated_vars);
extern Node* adjust_appendrel_attrs(PlannerInfo* root, Node* node, AppendRelInfo* appinfo);
extern Node* adjust_appendrel_attrs_multilevel(
PlannerInfo *root, Node *node, Relids child_relids, Relids top_parent_relids);
extern AppendRelInfo **find_appinfos_by_relids(PlannerInfo *root, Relids relids, int *nappinfos);
extern void mark_parent_child_pushdown_flag(Query *parent, Query *child);
extern bool check_base_rel_in_fromlist(Query *parse, Node *jtnode);
extern UNIONALL_SHIPPING_TYPE precheck_shipping_union_all(Query *subquery, Node *setOp);