|
32 | 32 | #include "utils/ruleutils.h"
|
33 | 33 |
|
34 | 34 |
|
| 35 | +/*----------------------- |
| 36 | + * PartitionDispatch - information about one partitioned table in a partition |
| 37 | + * hierarchy required to route a tuple to one of its partitions |
| 38 | + * |
| 39 | + * reldesc Relation descriptor of the table |
| 40 | + * key Partition key information of the table |
| 41 | + * keystate Execution state required for expressions in the partition key |
| 42 | + * partdesc Partition descriptor of the table |
| 43 | + * tupslot A standalone TupleTableSlot initialized with this table's tuple |
| 44 | + * descriptor |
| 45 | + * tupmap TupleConversionMap to convert from the parent's rowtype to |
| 46 | + * this table's rowtype (when extracting the partition key of a |
| 47 | + * tuple just before routing it through this table) |
| 48 | + * indexes Array with partdesc->nparts members (for details on what |
| 49 | + * individual members represent, see how they are set in |
| 50 | + * get_partition_dispatch_recurse()) |
| 51 | + *----------------------- |
| 52 | + */ |
| 53 | +typedef struct PartitionDispatchData |
| 54 | +{ |
| 55 | + Relation reldesc; |
| 56 | + PartitionKey key; |
| 57 | + List *keystate; /* list of ExprState */ |
| 58 | + PartitionDesc partdesc; |
| 59 | + TupleTableSlot *tupslot; |
| 60 | + TupleConversionMap *tupmap; |
| 61 | + int *indexes; |
| 62 | +} PartitionDispatchData; |
| 63 | + |
| 64 | + |
35 | 65 | static PartitionDispatch *RelationGetPartitionDispatchInfo(Relation rel,
|
36 | 66 | int *num_parted, List **leaf_part_oids);
|
37 | 67 | static void get_partition_dispatch_recurse(Relation rel, Relation parent,
|
|
0 commit comments