diff options
Diffstat (limited to 'src/include/nodes')
| -rw-r--r-- | src/include/nodes/parsenodes.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index e43a1f946a9..bc7adba4a0f 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -966,16 +966,39 @@ typedef struct PartitionRangeDatum } PartitionRangeDatum; /* + * PartitionDesc - info about a single partition for the ALTER TABLE SPLIT + * PARTITION command + */ +typedef struct SinglePartitionSpec +{ + NodeTag type; + + RangeVar *name; /* name of partition */ + PartitionBoundSpec *bound; /* FOR VALUES, if attaching */ +} SinglePartitionSpec; + +/* * PartitionCmd - info for ALTER TABLE/INDEX ATTACH/DETACH PARTITION and for - * ALTER TABLE MERGE PARTITIONS commands + * ALTER TABLE SPLIT/MERGE PARTITION(S) commands */ typedef struct PartitionCmd { NodeTag type; - RangeVar *name; /* name of partition to attach/detach/merge */ - PartitionBoundSpec *bound; /* FOR VALUES, if attaching */ - List *partlist; /* list of partitions to be merged, used in - * ALTER TABLE MERGE PARTITIONS */ + + /* name of partition to attach/detach/merge/split */ + RangeVar *name; + + /* FOR VALUES, if attaching */ + PartitionBoundSpec *bound; + + /* + * list of partitions to be split/merged, used in ALTER TABLE MERGE + * PARTITIONS and ALTER TABLE SPLIT PARTITIONS. For merge partitions, + * partlist is a list of RangeVar; For split partition, it is a list of + * SinglePartitionSpec. + */ + List *partlist; + bool concurrent; } PartitionCmd; @@ -2479,6 +2502,7 @@ typedef enum AlterTableType AT_AttachPartition, /* ATTACH PARTITION */ AT_DetachPartition, /* DETACH PARTITION */ AT_DetachPartitionFinalize, /* DETACH PARTITION FINALIZE */ + AT_SplitPartition, /* SPLIT PARTITION */ AT_MergePartitions, /* MERGE PARTITIONS */ AT_AddIdentity, /* ADD IDENTITY */ AT_SetIdentity, /* SET identity column options */ |
