PostgreSQL Source Code git master
Loading...
Searching...
No Matches
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-2026, 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" /* IWYU pragma: export */
24
25/* ----------------
26 * pg_partitioned_table definition. cpp turns this into
27 * typedef struct FormData_pg_partitioned_table
28 * ----------------
29 */
31
33{
34 Oid partrelid BKI_LOOKUP(pg_class); /* partitioned table oid */
35 char partstrat; /* partitioning strategy */
36 int16 partnatts; /* number of partition key columns */
37 Oid partdefid BKI_LOOKUP_OPT(pg_class); /* default partition oid;
38 * 0 if there isn't one */
39
40 /*
41 * variable-length fields start here, but we allow direct access to
42 * partattrs via the C struct. That's because the first variable-length
43 * field of a heap tuple can be reliably accessed using its C struct
44 * offset, as previous fields are all non-nullable fixed-length fields.
45 */
46 int2vector partattrs BKI_FORCE_NOT_NULL; /* each member of the array is
47 * the attribute number of a
48 * partition key column, or 0
49 * if the column is actually
50 * an expression */
51
52#ifdef CATALOG_VARLEN
54 * compare keys */
55 oidvector partcollation BKI_LOOKUP_OPT(pg_collation) BKI_FORCE_NOT_NULL; /* user-specified
56 * collation for keys */
57 pg_node_tree partexprs; /* list of expressions in the partition key;
58 * one item for each zero entry in partattrs[] */
59#endif
61
63
64/* ----------------
65 * Form_pg_partitioned_table corresponds to a pointer to a tuple with
66 * the format of pg_partitioned_table relation.
67 * ----------------
68 */
70
72
74
76
77/* partattrs can contain zero (InvalidAttrNumber) to represent expressions */
79
80#endif /* PG_PARTITIONED_TABLE_H */
int16_t int16
Definition c.h:574
#define BEGIN_CATALOG_STRUCT
Definition genbki.h:37
#define DECLARE_UNIQUE_INDEX_PKEY(name, oid, oidmacro, tblname, decl)
Definition genbki.h:105
#define BKI_LOOKUP(catalog)
Definition genbki.h:65
#define END_CATALOG_STRUCT
Definition genbki.h:38
#define BKI_LOOKUP_OPT(catalog)
Definition genbki.h:66
#define BKI_FORCE_NOT_NULL
Definition genbki.h:52
#define DECLARE_TOAST(name, toastoid, indexoid)
Definition genbki.h:82
#define CATALOG(name, oid, oidmacro)
Definition genbki.h:42
#define DECLARE_ARRAY_FOREIGN_KEY_OPT(cols, reftbl, refcols)
Definition genbki.h:140
#define MAKE_SYSCACHE(name, idxname, nbuckets)
Definition genbki.h:146
int16 attnum
END_CATALOG_STRUCT typedef FormData_pg_partitioned_table * Form_pg_partitioned_table
FormData_pg_partitioned_table
unsigned int Oid
static int fb(int x)
Definition c.h:778