aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execPartition.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2018-09-14 19:06:57 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2018-09-14 19:35:06 -0300
commit444455c2d9094c70f42706184064a9729906253e (patch)
tree40f85dfea1314eaed99163475d71f474d1f8779d /src/backend/executor/execPartition.c
parent6009bad9134782babfc45c6bae6cfbca7f4899d0 (diff)
downloadpostgresql-444455c2d9094c70f42706184064a9729906253e.tar.gz
postgresql-444455c2d9094c70f42706184064a9729906253e.zip
Move PartitionDispatchData struct definition to execPartition.c
There's no reason to expose the struct definition, so don't. Author: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> Discussion: https://postgr.es/m/d3fa24c1-bc65-7133-81df-6474387ccc4f@lab.ntt.co.jp
Diffstat (limited to 'src/backend/executor/execPartition.c')
-rw-r--r--src/backend/executor/execPartition.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c
index 225aa12c3f6..011e3cff1ad 100644
--- a/src/backend/executor/execPartition.c
+++ b/src/backend/executor/execPartition.c
@@ -32,6 +32,36 @@
#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,