diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-04-14 21:12:14 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-04-14 21:12:14 -0300 |
commit | da6f3e45ddb68ab3161076e120e7c32cfd46d1db (patch) | |
tree | ce5b30869c67d8be6a86fd6f8f0ba95b5ed61e73 /src/include/nodes/parsenodes.h | |
parent | b39fd897e0398a6bdc6552daa7cacdf9c0e46d7e (diff) | |
download | postgresql-da6f3e45ddb68ab3161076e120e7c32cfd46d1db.tar.gz postgresql-da6f3e45ddb68ab3161076e120e7c32cfd46d1db.zip |
Reorganize partitioning code
There's been a massive addition of partitioning code in PostgreSQL 11,
with little oversight on its placement, resulting in a
catalog/partition.c with poorly defined boundaries and responsibilities.
This commit tries to set a couple of distinct modules to separate things
a little bit. There are no code changes here, only code movement.
There are three new files:
src/backend/utils/cache/partcache.c
src/include/partitioning/partdefs.h
src/include/utils/partcache.h
The previous arrangement of #including catalog/partition.h almost
everywhere is no more.
Authors: Amit Langote and Álvaro Herrera
Discussion: https://postgr.es/m/98e8d509-790a-128c-be7f-e48a5b2d8d97@lab.ntt.co.jp
https://postgr.es/m/11aa0c50-316b-18bb-722d-c23814f39059@lab.ntt.co.jp
https://postgr.es/m/143ed9a4-6038-76d4-9a55-502035815e68@lab.ntt.co.jp
https://postgr.es/m/20180413193503.nynq7bnmgh6vs5vm@alvherre.pgsql
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index de020e68a41..cbbe0650783 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -26,6 +26,8 @@ #include "nodes/lockoptions.h" #include "nodes/primnodes.h" #include "nodes/value.h" +#include "partitioning/partdefs.h" + typedef enum OverridingKind { @@ -803,7 +805,7 @@ typedef struct PartitionSpec * This represents the portion of the partition key space assigned to a * particular partition. These are stored on disk in pg_class.relpartbound. */ -typedef struct PartitionBoundSpec +struct PartitionBoundSpec { NodeTag type; @@ -822,7 +824,7 @@ typedef struct PartitionBoundSpec List *upperdatums; /* List of PartitionRangeDatums */ int location; /* token location, or -1 if unknown */ -} PartitionBoundSpec; +}; /* * PartitionRangeDatum - one of the values in a range partition bound |