1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Remove PartitionRoutingInfo struct.

The extra indirection neeeded to access its members via its enclosing
ResultRelInfo seems pointless. Move all the fields from
PartitionRoutingInfo to ResultRelInfo.

Author: Amit Langote
Reviewed-by: Alvaro Herrera
Discussion: https://www.postgresql.org/message-id/CA%2BHiwqFViT47Zbr_ASBejiK7iDG8%3DQ1swQ-tjM6caRPQ67pT%3Dw%40mail.gmail.com
This commit is contained in:
Heikki Linnakangas
2020-10-19 14:11:57 +03:00
parent 6973533650
commit fb5883da86
7 changed files with 45 additions and 65 deletions

View File

@ -33,7 +33,6 @@
#include "utils/tuplestore.h"
struct PlanState; /* forward references in this file */
struct PartitionRoutingInfo;
struct ParallelHashJoinState;
struct ExecRowMark;
struct ExprState;
@ -480,11 +479,17 @@ typedef struct ResultRelInfo
/* partition check expression state (NULL if not set up yet) */
ExprState *ri_PartitionCheckExpr;
/* relation descriptor for partitioned table's root, if any */
/*
* Information needed by tuple routing target relations
*
* PartitionRoot gives the target relation mentioned in the query.
* RootToPartitionMap and PartitionTupleSlot, initialized by
* ExecInitRoutingInfo, are non-NULL if partition has a different tuple
* format than the root table.
*/
Relation ri_PartitionRoot;
/* info for partition tuple routing (NULL if not set up yet) */
struct PartitionRoutingInfo *ri_PartitionInfo;
TupleConversionMap *ri_RootToPartitionMap;
TupleTableSlot *ri_PartitionTupleSlot;
/*
* Map to convert child result relation tuples to the format of the table