diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/access/tupconvert.h | 3 | ||||
| -rw-r--r-- | src/include/executor/executor.h | 1 | ||||
| -rw-r--r-- | src/include/nodes/execnodes.h | 30 |
3 files changed, 21 insertions, 13 deletions
diff --git a/src/include/access/tupconvert.h b/src/include/access/tupconvert.h index a37dafc666d..2badb8c239d 100644 --- a/src/include/access/tupconvert.h +++ b/src/include/access/tupconvert.h @@ -39,6 +39,9 @@ extern TupleConversionMap *convert_tuples_by_position(TupleDesc indesc, extern TupleConversionMap *convert_tuples_by_name(TupleDesc indesc, TupleDesc outdesc); +extern TupleConversionMap *convert_tuples_by_name_attrmap(TupleDesc indesc, + TupleDesc outdesc, + AttrMap *attrMap); extern HeapTuple execute_attr_map_tuple(HeapTuple tuple, TupleConversionMap *map); extern TupleTableSlot *execute_attr_map_slot(AttrMap *attrMap, diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index ed95ed1176d..aaf2bc78b9c 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -600,6 +600,7 @@ extern TupleTableSlot *ExecGetTriggerOldSlot(EState *estate, ResultRelInfo *relI extern TupleTableSlot *ExecGetTriggerNewSlot(EState *estate, ResultRelInfo *relInfo); extern TupleTableSlot *ExecGetReturningSlot(EState *estate, ResultRelInfo *relInfo); extern TupleConversionMap *ExecGetChildToRootMap(ResultRelInfo *resultRelInfo); +extern TupleConversionMap *ExecGetRootToChildMap(ResultRelInfo *resultRelInfo, EState *estate); extern Bitmapset *ExecGetInsertedCols(ResultRelInfo *relinfo, EState *estate); extern Bitmapset *ExecGetUpdatedCols(ResultRelInfo *relinfo, EState *estate); diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index a2008846c63..71248a94660 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -539,6 +539,21 @@ typedef struct ResultRelInfo ExprState *ri_PartitionCheckExpr; /* + * Map to convert child result relation tuples to the format of the table + * actually mentioned in the query (called "root"). Computed only if + * needed. A NULL map value indicates that no conversion is needed, so we + * must have a separate flag to show if the map has been computed. + */ + TupleConversionMap *ri_ChildToRootMap; + bool ri_ChildToRootMapValid; + + /* + * As above, but in the other direction. + */ + TupleConversionMap *ri_RootToChildMap; + bool ri_RootToChildMapValid; + + /* * Information needed by tuple routing target relations * * RootResultRelInfo gives the target relation mentioned in the query, if @@ -546,23 +561,12 @@ typedef struct ResultRelInfo * mentioned in the query is an inherited table, nor when tuple routing is * not needed. * - * RootToPartitionMap and PartitionTupleSlot, initialized by - * ExecInitRoutingInfo, are non-NULL if partition has a different tuple - * format than the root table. + * PartitionTupleSlot is non-NULL if RootToChild conversion is needed and + * the relation is a partition. */ struct ResultRelInfo *ri_RootResultRelInfo; - TupleConversionMap *ri_RootToPartitionMap; TupleTableSlot *ri_PartitionTupleSlot; - /* - * Map to convert child result relation tuples to the format of the table - * actually mentioned in the query (called "root"). Computed only if - * needed. A NULL map value indicates that no conversion is needed, so we - * must have a separate flag to show if the map has been computed. - */ - TupleConversionMap *ri_ChildToRootMap; - bool ri_ChildToRootMapValid; - /* for use by copyfrom.c when performing multi-inserts */ struct CopyMultiInsertBuffer *ri_CopyMultiInsertBuffer; |
