aboutsummaryrefslogtreecommitdiff
path: root/src/include/partitioning/partdesc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/partitioning/partdesc.h')
-rw-r--r--src/include/partitioning/partdesc.h39
1 files changed, 39 insertions, 0 deletions
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 */