PostgreSQL Source Code git master
Loading...
Searching...
No Matches
pg_inherits.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * pg_inherits.h
4 * definition of the "inherits" system catalog (pg_inherits)
5 *
6 *
7 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/catalog/pg_inherits.h
11 *
12 * NOTES
13 * The Catalog.pm module reads this file and derives schema
14 * information.
15 *
16 *-------------------------------------------------------------------------
17 */
18#ifndef PG_INHERITS_H
19#define PG_INHERITS_H
20
21#include "catalog/genbki.h"
22#include "catalog/pg_inherits_d.h" /* IWYU pragma: export */
23
24#include "nodes/pg_list.h"
25#include "storage/lock.h"
26
27/* ----------------
28 * pg_inherits definition. cpp turns this into
29 * typedef struct FormData_pg_inherits
30 * ----------------
31 */
33
41
43
44/* ----------------
45 * Form_pg_inherits corresponds to a pointer to a tuple with
46 * the format of pg_inherits relation.
47 * ----------------
48 */
50
53
54
56extern List *find_inheritance_children_extended(Oid parentrelId, bool omit_detached,
57 LOCKMODE lockmode, bool *detached_exist, TransactionId *detached_xmin);
58
61extern bool has_subclass(Oid relationId);
62extern bool has_superclass(Oid relationId);
66extern bool DeleteInheritsTuple(Oid inhrelid, Oid inhparent,
68 const char *childname);
69extern bool PartitionHasPendingDetach(Oid partoid);
70
71#endif /* PG_INHERITS_H */
int32_t int32
Definition c.h:554
uint32 TransactionId
Definition c.h:678
#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 CATALOG(name, oid, oidmacro)
Definition genbki.h:42
#define DECLARE_INDEX(name, oid, oidmacro, tblname, decl)
Definition genbki.h:103
int LOCKMODE
Definition lockdefs.h:26
FormData_pg_inherits
Definition pg_inherits.h:40
List * find_all_inheritors(Oid parentrelId, LOCKMODE lockmode, List **numparents)
bool has_subclass(Oid relationId)
bool DeleteInheritsTuple(Oid inhrelid, Oid inhparent, bool expect_detach_pending, const char *childname)
END_CATALOG_STRUCT typedef FormData_pg_inherits * Form_pg_inherits
Definition pg_inherits.h:49
List * find_inheritance_children(Oid parentrelId, LOCKMODE lockmode)
Definition pg_inherits.c:58
void StoreSingleInheritance(Oid relationId, Oid parentOid, int32 seqNumber)
List * find_inheritance_children_extended(Oid parentrelId, bool omit_detached, LOCKMODE lockmode, bool *detached_exist, TransactionId *detached_xmin)
Definition pg_inherits.c:82
bool has_superclass(Oid relationId)
bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId)
bool PartitionHasPendingDetach(Oid partoid)
unsigned int Oid
static int fb(int x)
Definition pg_list.h:54