PostgreSQL Source Code  git master
pg_partitioned_table.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_partitioned_table.h
4  * definition of the "partitioned table" system catalog
5  * (pg_partitioned_table)
6  *
7  *
8  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/catalog/pg_partitioned_table.h
12  *
13  * NOTES
14  * The Catalog.pm module reads this file and derives schema
15  * information.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PG_PARTITIONED_TABLE_H
20 #define PG_PARTITIONED_TABLE_H
21 
22 #include "catalog/genbki.h"
23 #include "catalog/pg_partitioned_table_d.h"
24 
25 /* ----------------
26  * pg_partitioned_table definition. cpp turns this into
27  * typedef struct FormData_pg_partitioned_table
28  * ----------------
29  */
30 CATALOG(pg_partitioned_table,3350,PartitionedRelationId) BKI_WITHOUT_OIDS
31 {
32  Oid partrelid; /* partitioned table oid */
33  char partstrat; /* partitioning strategy */
34  int16 partnatts; /* number of partition key columns */
35  Oid partdefid; /* default partition oid; InvalidOid if there
36  * isn't one */
37 
38  /*
39  * variable-length fields start here, but we allow direct access to
40  * partattrs via the C struct. That's because the first variable-length
41  * field of a heap tuple can be reliably accessed using its C struct
42  * offset, as previous fields are all non-nullable fixed-length fields.
43  */
44  int2vector partattrs; /* each member of the array is the attribute
45  * number of a partition key column, or 0 if
46  * the column is actually an expression */
47 
48 #ifdef CATALOG_VARLEN
49  oidvector partclass; /* operator class to compare keys */
50  oidvector partcollation; /* user-specified collation for keys */
51  pg_node_tree partexprs; /* list of expressions in the partition key;
52  * one item for each zero entry in partattrs[] */
53 #endif
55 
56 /* ----------------
57  * Form_pg_partitioned_table corresponds to a pointer to a tuple with
58  * the format of pg_partitioned_table relation.
59  * ----------------
60  */
62 
63 #endif /* PG_PARTITIONED_TABLE_H */
signed short int16
Definition: c.h:312
Definition: c.h:555
CATALOG(pg_partitioned_table, 3350, PartitionedRelationId) BKI_WITHOUT_OIDS
unsigned int Oid
Definition: postgres_ext.h:31
FormData_pg_partitioned_table * Form_pg_partitioned_table
#define BKI_WITHOUT_OIDS
Definition: genbki.h:28
FormData_pg_partitioned_table
Definition: c.h:544