PostgreSQL Source Code  git master
partdesc.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * partdesc.h
4  *
5  * Copyright (c) 1996-2019, PostgreSQL Global Development Group
6  *
7  * src/include/utils/partdesc.h
8  *
9  *-------------------------------------------------------------------------
10  */
11 
12 #ifndef PARTDESC_H
13 #define PARTDESC_H
14 
15 #include "partitioning/partdefs.h"
16 #include "utils/relcache.h"
17 
18 /*
19  * Information about partitions of a partitioned table.
20  */
21 typedef struct PartitionDescData
22 {
23  int nparts; /* Number of partitions */
24  Oid *oids; /* Array of 'nparts' elements containing
25  * partition OIDs in order of the their bounds */
26  bool *is_leaf; /* Array of 'nparts' elements storing whether
27  * the corresponding 'oids' element belongs to
28  * a leaf partition or not */
29  PartitionBoundInfo boundinfo; /* collection of partition bounds */
31 
32 extern void RelationBuildPartitionDesc(Relation rel);
33 
37 
39 
40 extern bool equalPartitionDescs(PartitionKey key, PartitionDesc partdesc1,
41  PartitionDesc partdesc2);
42 
43 #endif /* PARTCACHE_H */
void DestroyPartitionDirectory(PartitionDirectory pdir)
Definition: partdesc.c:302
void RelationBuildPartitionDesc(Relation rel)
Definition: partdesc.c:61
PartitionDirectory CreatePartitionDirectory(MemoryContext mcxt)
Definition: partdesc.c:242
bool * is_leaf
Definition: partdesc.h:26
unsigned int Oid
Definition: postgres_ext.h:31
Oid get_default_oid_from_partdesc(PartitionDesc partdesc)
Definition: partdesc.c:373
PartitionBoundInfo boundinfo
Definition: partdesc.h:29
bool equalPartitionDescs(PartitionKey key, PartitionDesc partdesc1, PartitionDesc partdesc2)
Definition: partdesc.c:317
PartitionDesc PartitionDirectoryLookup(PartitionDirectory, Relation)
Definition: partdesc.c:274
struct PartitionDescData PartitionDescData