Move PartitionDispatchData struct definition to execPartition.c
authorAlvaro Herrera
Fri, 14 Sep 2018 22:06:57 +0000 (19:06 -0300)
committerAlvaro Herrera
Fri, 14 Sep 2018 22:06:57 +0000 (19:06 -0300)
There's no reason to expose the struct definition, so don't.

Author: Amit Langote 
Discussion: https://postgr.es/m/d3fa24c1-bc65-7133-81df-6474387ccc4f@lab.ntt.co.jp

src/backend/executor/execPartition.c
src/include/executor/execPartition.h

index 1a9943c3aacf86f1a2da0fc0fe35558fa0ccf8ff..38ecc4192eeeca3654845bf2132fdc8715577506 100644 (file)
 #include "utils/ruleutils.h"
 
 
+/*-----------------------
+ * PartitionDispatch - information about one partitioned table in a partition
+ * hierarchy required to route a tuple to one of its partitions
+ *
+ * reldesc     Relation descriptor of the table
+ * key         Partition key information of the table
+ * keystate    Execution state required for expressions in the partition key
+ * partdesc    Partition descriptor of the table
+ * tupslot     A standalone TupleTableSlot initialized with this table's tuple
+ *             descriptor
+ * tupmap      TupleConversionMap to convert from the parent's rowtype to
+ *             this table's rowtype (when extracting the partition key of a
+ *             tuple just before routing it through this table)
+ * indexes     Array with partdesc->nparts members (for details on what
+ *             individual members represent, see how they are set in
+ *             get_partition_dispatch_recurse())
+ *-----------------------
+ */
+typedef struct PartitionDispatchData
+{
+   Relation    reldesc;
+   PartitionKey key;
+   List       *keystate;       /* list of ExprState */
+   PartitionDesc partdesc;
+   TupleTableSlot *tupslot;
+   TupleConversionMap *tupmap;
+   int        *indexes;
+} PartitionDispatchData;
+
+
 static PartitionDispatch *RelationGetPartitionDispatchInfo(Relation rel,
                                 int *num_parted, List **leaf_part_oids);
 static void get_partition_dispatch_recurse(Relation rel, Relation parent,
index f6cd842cc9b6dd15fa931079c2836ee34c6d7333..89ce53815c7b714149ccd91435439bbf4bf98768 100644 (file)
 #include "nodes/plannodes.h"
 #include "partitioning/partprune.h"
 
-/*-----------------------
- * PartitionDispatch - information about one partitioned table in a partition
- * hierarchy required to route a tuple to one of its partitions
- *
- * reldesc     Relation descriptor of the table
- * key         Partition key information of the table
- * keystate    Execution state required for expressions in the partition key
- * partdesc    Partition descriptor of the table
- * tupslot     A standalone TupleTableSlot initialized with this table's tuple
- *             descriptor
- * tupmap      TupleConversionMap to convert from the parent's rowtype to
- *             this table's rowtype (when extracting the partition key of a
- *             tuple just before routing it through this table)
- * indexes     Array with partdesc->nparts members (for details on what
- *             individual members represent, see how they are set in
- *             get_partition_dispatch_recurse())
- *-----------------------
- */
-typedef struct PartitionDispatchData
-{
-   Relation    reldesc;
-   PartitionKey key;
-   List       *keystate;       /* list of ExprState */
-   PartitionDesc partdesc;
-   TupleTableSlot *tupslot;
-   TupleConversionMap *tupmap;
-   int        *indexes;
-} PartitionDispatchData;
-
+/* See execPartition.c for the definition. */
 typedef struct PartitionDispatchData *PartitionDispatch;
 
 /*-----------------------