diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/partition.h | 15 | ||||
-rw-r--r-- | src/include/partitioning/partdesc.h | 39 | ||||
-rw-r--r-- | src/include/utils/partcache.h | 1 |
3 files changed, 39 insertions, 16 deletions
diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h index 5685d2fd579..d84e3259835 100644 --- a/src/include/catalog/partition.h +++ b/src/include/catalog/partition.h @@ -19,20 +19,6 @@ /* Seed for the extended hash function */ #define HASH_PARTITION_SEED UINT64CONST(0x7A5B22367996DCFD) -/* - * Information about partitions of a partitioned table. - */ -typedef struct PartitionDescData -{ - int nparts; /* Number of partitions */ - Oid *oids; /* Array of 'nparts' elements containing - * partition OIDs in order of the their bounds */ - bool *is_leaf; /* Array of 'nparts' elements storing whether - * the corresponding 'oids' element belongs to - * a leaf partition or not */ - PartitionBoundInfo boundinfo; /* collection of partition bounds */ -} PartitionDescData; - extern Oid get_partition_parent(Oid relid); extern List *get_partition_ancestors(Oid relid); extern List *map_partition_varattnos(List *expr, int fromrel_varno, @@ -41,7 +27,6 @@ extern List *map_partition_varattnos(List *expr, int fromrel_varno, extern bool has_partition_attrs(Relation rel, Bitmapset *attnums, bool *used_in_expr); -extern Oid get_default_oid_from_partdesc(PartitionDesc partdesc); extern Oid get_default_partition_oid(Oid parentId); extern void update_default_partition_oid(Oid parentId, Oid defaultPartId); extern List *get_proposed_default_constraint(List *new_part_constaints); diff --git a/src/include/partitioning/partdesc.h b/src/include/partitioning/partdesc.h new file mode 100644 index 00000000000..f72b70dded6 --- /dev/null +++ b/src/include/partitioning/partdesc.h @@ -0,0 +1,39 @@ +/*------------------------------------------------------------------------- + * + * partdesc.h + * + * Copyright (c) 1996-2018, PostgreSQL Global Development Group + * + * src/include/utils/partdesc.h + * + *------------------------------------------------------------------------- + */ + +#ifndef PARTDESC_H +#define PARTDESC_H + +#include "partitioning/partdefs.h" +#include "utils/relcache.h" + +/* + * Information about partitions of a partitioned table. + */ +typedef struct PartitionDescData +{ + int nparts; /* Number of partitions */ + Oid *oids; /* Array of 'nparts' elements containing + * partition OIDs in order of the their bounds */ + bool *is_leaf; /* Array of 'nparts' elements storing whether + * the corresponding 'oids' element belongs to + * a leaf partition or not */ + PartitionBoundInfo boundinfo; /* collection of partition bounds */ +} PartitionDescData; + +extern void RelationBuildPartitionDesc(Relation rel); + +extern Oid get_default_oid_from_partdesc(PartitionDesc partdesc); + +extern bool equalPartitionDescs(PartitionKey key, PartitionDesc partdesc1, + PartitionDesc partdesc2); + +#endif /* PARTCACHE_H */ diff --git a/src/include/utils/partcache.h b/src/include/utils/partcache.h index 7c2f973f68e..823ad2eeb65 100644 --- a/src/include/utils/partcache.h +++ b/src/include/utils/partcache.h @@ -47,7 +47,6 @@ typedef struct PartitionKeyData } PartitionKeyData; extern void RelationBuildPartitionKey(Relation relation); -extern void RelationBuildPartitionDesc(Relation rel); extern List *RelationGetPartitionQual(Relation rel); extern Expr *get_partition_qual_relid(Oid relid); |