Skip to content

Commit 6b78231

Browse files
committed
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
1 parent 548e509 commit 6b78231

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

src/backend/executor/execPartition.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,36 @@
3232
#include "utils/ruleutils.h"
3333

3434

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+
3565
static PartitionDispatch *RelationGetPartitionDispatchInfo(Relation rel,
3666
int *num_parted, List **leaf_part_oids);
3767
static void get_partition_dispatch_recurse(Relation rel, Relation parent,

src/include/executor/execPartition.h

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,7 @@
1818
#include "nodes/plannodes.h"
1919
#include "partitioning/partprune.h"
2020

21-
/*-----------------------
22-
* PartitionDispatch - information about one partitioned table in a partition
23-
* hierarchy required to route a tuple to one of its partitions
24-
*
25-
* reldesc Relation descriptor of the table
26-
* key Partition key information of the table
27-
* keystate Execution state required for expressions in the partition key
28-
* partdesc Partition descriptor of the table
29-
* tupslot A standalone TupleTableSlot initialized with this table's tuple
30-
* descriptor
31-
* tupmap TupleConversionMap to convert from the parent's rowtype to
32-
* this table's rowtype (when extracting the partition key of a
33-
* tuple just before routing it through this table)
34-
* indexes Array with partdesc->nparts members (for details on what
35-
* individual members represent, see how they are set in
36-
* get_partition_dispatch_recurse())
37-
*-----------------------
38-
*/
39-
typedef struct PartitionDispatchData
40-
{
41-
Relation reldesc;
42-
PartitionKey key;
43-
List *keystate; /* list of ExprState */
44-
PartitionDesc partdesc;
45-
TupleTableSlot *tupslot;
46-
TupleConversionMap *tupmap;
47-
int *indexes;
48-
} PartitionDispatchData;
49-
21+
/* See execPartition.c for the definition. */
5022
typedef struct PartitionDispatchData *PartitionDispatch;
5123

5224
/*-----------------------

0 commit comments

Comments
 (0)