1/*-------------------------------------------------------------------------
4 * definition of the "shared dependency" system catalog (pg_shdepend)
6 * pg_shdepend has no preloaded contents, so there is no pg_shdepend.dat
7 * file; dependencies for system-defined objects are loaded into it
8 * on-the-fly during initdb. Most built-in objects are pinned anyway,
9 * and hence need no explicit entries in pg_shdepend.
11 * NOTE: we do not represent all possible dependency pairs in pg_shdepend;
12 * for example, there's not much value in creating an explicit dependency
13 * from a relation to its database. Currently, only dependencies on roles
14 * are explicitly stored in pg_shdepend.
16 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
17 * Portions Copyright (c) 1994, Regents of the University of California
19 * src/include/catalog/pg_shdepend.h
22 * The Catalog.pm module reads this file and derives schema
25 *-------------------------------------------------------------------------
31#include "catalog/pg_shdepend_d.h" /* IWYU pragma: export */
34 * pg_shdepend definition. cpp turns this into
35 * typedef struct FormData_pg_shdepend
41 * Identification of the dependent (referencing) object.
43 * Note that dbid can be zero to denote a shared object.
46 * containing object */
49 Oid objid;
/* OID of object itself */
50 int32 objsubid;
/* column number, or 0 if not used */
53 * Identification of the independent (referenced) object. This is always
54 * a shared object, so we need no database ID field. We don't bother with
55 * a sub-object ID either.
57 Oid refclassid
BKI_LOOKUP(pg_class);
/* OID of table containing
59 Oid refobjid;
/* OID of object itself */
62 * Precise semantics of the relationship are specified by the deptype
63 * field. See SharedDependencyType in catalog/dependency.h.
65 char deptype;
/* see codes in dependency.h */
69 * Form_pg_shdepend corresponds to a pointer to a row with
70 * the format of pg_shdepend relation.
75 DECLARE_INDEX(pg_shdepend_depender_index, 1232, SharedDependDependerIndexId, pg_shdepend, btree(dbid oid_ops, classid oid_ops, objid oid_ops, objsubid int4_ops));
76 DECLARE_INDEX(pg_shdepend_reference_index, 1233, SharedDependReferenceIndexId, pg_shdepend, btree(refclassid oid_ops, refobjid oid_ops));
78#endif /* PG_SHDEPEND_H */
#define BKI_LOOKUP(catalog)
#define BKI_LOOKUP_OPT(catalog)
#define BKI_SHARED_RELATION
DECLARE_INDEX(pg_shdepend_depender_index, 1232, SharedDependDependerIndexId, pg_shdepend, btree(dbid oid_ops, classid oid_ops, objid oid_ops, objsubid int4_ops))
FormData_pg_shdepend * Form_pg_shdepend
CATALOG(pg_shdepend, 1214, SharedDependRelationId) BKI_SHARED_RELATION