1/*-------------------------------------------------------------------------
2 *
3 * pg_depend.h
4 * definition of the "dependency" system catalog (pg_depend)
5 *
6 * pg_depend has no preloaded contents, so there is no pg_depend.dat
7 * file; system-defined dependencies are loaded into it during a late stage
8 * of the initdb process.
9 *
10 * NOTE: we do not represent all possible dependency pairs in pg_depend;
11 * for example, there's not much value in creating an explicit dependency
12 * from an attribute to its relation. Usually we make a dependency for
13 * cases where the relationship is conditional rather than essential
14 * (for example, not all triggers are dependent on constraints, but all
15 * attributes are dependent on relations) or where the dependency is not
16 * convenient to find from the contents of other catalogs.
17 *
18 *
19 * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
20 * Portions Copyright (c) 1994, Regents of the University of California
21 *
22 * src/include/catalog/pg_depend.h
23 *
24 * NOTES
25 * The Catalog.pm module reads this file and derives schema
26 * information.
27 *
28 *-------------------------------------------------------------------------
29 */
30#ifndef PG_DEPEND_H
31#define PG_DEPEND_H
32
33#include "catalog/genbki.h"
34#include "catalog/pg_depend_d.h"
35
36/* ----------------
37 * pg_depend definition. cpp turns this into
38 * typedef struct FormData_pg_depend
39 * ----------------
40 */
41CATALOG(pg_depend,2608,DependRelationId)
42{
43 /*
44 * Identification of the dependent (referencing) object.
45 *
46 * These fields are all zeroes for a DEPENDENCY_PIN entry.
47 */
48 Oid classid; /* OID of table containing object */
49 Oid objid; /* OID of object itself */
50 int32 objsubid; /* column number, or 0 if not used */
51
52 /*
53 * Identification of the independent (referenced) object.
54 */
55 Oid refclassid; /* OID of table containing object */
56 Oid refobjid; /* OID of object itself */
57 int32 refobjsubid; /* column number, or 0 if not used */
58
59 /*
60 * Precise semantics of the relationship are specified by the deptype
61 * field. See DependencyType in catalog/dependency.h.
62 */
63 char deptype; /* see codes in dependency.h */
64} FormData_pg_depend;
65
66/* ----------------
67 * Form_pg_depend corresponds to a pointer to a row with
68 * the format of pg_depend relation.
69 * ----------------
70 */
71typedef FormData_pg_depend *Form_pg_depend;
72
73#endif /* PG_DEPEND_H */
74