PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_partitioned_table.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_partitioned_table.h
4  * definition of the system "partitioned table" relation
5  * along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  *
10  * src/include/catalog/pg_partitioned_table.h
11  *
12  * NOTES
13  * the genbki.sh script reads this file and generates .bki
14  * information from the DATA() statements.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_PARTITIONED_TABLE_H
19 #define PG_PARTITIONED_TABLE_H
20 
21 #include "catalog/genbki.h"
22 
23 /* ----------------
24  * pg_partitioned_table definition. cpp turns this into
25  * typedef struct FormData_pg_partitioned_table
26  * ----------------
27  */
28 #define PartitionedRelationId 3350
29 
30 CATALOG(pg_partitioned_table,3350) BKI_WITHOUT_OIDS
31 {
32  Oid partrelid; /* partitioned table oid */
33  char partstrat; /* partitioning strategy */
34  int16 partnatts; /* number of partition key columns */
35 
36  /*
37  * variable-length fields start here, but we allow direct access to
38  * partattrs via the C struct. That's because the first variable-length
39  * field of a heap tuple can be reliably accessed using its C struct
40  * offset, as previous fields are all non-nullable fixed-length fields.
41  */
42  int2vector partattrs; /* each member of the array is the attribute
43  * number of a partition key column, or 0 if
44  * the column is actually an expression */
45 
46 #ifdef CATALOG_VARLEN
47  oidvector partclass; /* operator class to compare keys */
48  oidvector partcollation; /* user-specified collation for keys */
49  pg_node_tree partexprs; /* list of expressions in the partition key;
50  * one item for each zero entry in partattrs[] */
51 #endif
53 
54 /* ----------------
55  * Form_pg_partitioned_table corresponds to a pointer to a tuple with
56  * the format of pg_partitioned_table relation.
57  * ----------------
58  */
60 
61 /* ----------------
62  * compiler constants for pg_partitioned_table
63  * ----------------
64  */
65 #define Natts_pg_partitioned_table 7
66 #define Anum_pg_partitioned_table_partrelid 1
67 #define Anum_pg_partitioned_table_partstrat 2
68 #define Anum_pg_partitioned_table_partnatts 3
69 #define Anum_pg_partitioned_table_partattrs 4
70 #define Anum_pg_partitioned_table_partclass 5
71 #define Anum_pg_partitioned_table_partcollation 6
72 #define Anum_pg_partitioned_table_partexprs 7
73 
74 #endif /* PG_PARTITIONED_TABLE_H */
signed short int16
Definition: c.h:255
Definition: c.h:478
CATALOG(pg_partitioned_table, 3350) 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:467