pg_amcheck: Fix test failure on Windows with non-existing role
[pgsql.git] / src / include / catalog / pg_inherits.h
blob1d6765ae9112c19b692c1ec0e3528a7f06d782a5
1 /*-------------------------------------------------------------------------
3 * pg_inherits.h
4 * definition of the "inherits" system catalog (pg_inherits)
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/catalog/pg_inherits.h
12 * NOTES
13 * The Catalog.pm module reads this file and derives schema
14 * information.
16 *-------------------------------------------------------------------------
18 #ifndef PG_INHERITS_H
19 #define PG_INHERITS_H
21 #include "catalog/genbki.h"
22 #include "catalog/pg_inherits_d.h" /* IWYU pragma: export */
24 #include "nodes/pg_list.h"
25 #include "storage/lock.h"
27 /* ----------------
28 * pg_inherits definition. cpp turns this into
29 * typedef struct FormData_pg_inherits
30 * ----------------
32 CATALOG(pg_inherits,2611,InheritsRelationId)
34 Oid inhrelid BKI_LOOKUP(pg_class);
35 Oid inhparent BKI_LOOKUP(pg_class);
36 int32 inhseqno;
37 bool inhdetachpending;
38 } FormData_pg_inherits;
40 /* ----------------
41 * Form_pg_inherits corresponds to a pointer to a tuple with
42 * the format of pg_inherits relation.
43 * ----------------
45 typedef FormData_pg_inherits *Form_pg_inherits;
47 DECLARE_UNIQUE_INDEX_PKEY(pg_inherits_relid_seqno_index, 2680, InheritsRelidSeqnoIndexId, pg_inherits, btree(inhrelid oid_ops, inhseqno int4_ops));
48 DECLARE_INDEX(pg_inherits_parent_index, 2187, InheritsParentIndexId, pg_inherits, btree(inhparent oid_ops));
51 extern List *find_inheritance_children(Oid parentrelId, LOCKMODE lockmode);
52 extern List *find_inheritance_children_extended(Oid parentrelId, bool omit_detached,
53 LOCKMODE lockmode, bool *detached_exist, TransactionId *detached_xmin);
55 extern List *find_all_inheritors(Oid parentrelId, LOCKMODE lockmode,
56 List **numparents);
57 extern bool has_subclass(Oid relationId);
58 extern bool has_superclass(Oid relationId);
59 extern bool typeInheritsFrom(Oid subclassTypeId, Oid superclassTypeId);
60 extern void StoreSingleInheritance(Oid relationId, Oid parentOid,
61 int32 seqNumber);
62 extern bool DeleteInheritsTuple(Oid inhrelid, Oid inhparent,
63 bool expect_detach_pending,
64 const char *childname);
65 extern bool PartitionHasPendingDetach(Oid partoid);
67 #endif /* PG_INHERITS_H */