mirror of
https://github.com/postgres/postgres.git
synced 2026-04-15 22:10:45 -04:00
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* partdesc.h
|
|
*
|
|
* Copyright (c) 1996-2020, 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 PartitionDesc RelationGetPartitionDesc(Relation rel);
|
|
|
|
extern PartitionDirectory CreatePartitionDirectory(MemoryContext mcxt);
|
|
extern PartitionDesc PartitionDirectoryLookup(PartitionDirectory, Relation);
|
|
extern void DestroyPartitionDirectory(PartitionDirectory pdir);
|
|
|
|
extern Oid get_default_oid_from_partdesc(PartitionDesc partdesc);
|
|
|
|
#endif /* PARTCACHE_H */
|