Properly access a buffer's LSN using existing access macros instead of abusing
[PostgreSQL.git] / src / include / catalog / pg_depend.h
blob262529d6dafcea6430af53d04075e1a59d869a7b
1 /*-------------------------------------------------------------------------
3 * pg_depend.h
4 * definition of the system "dependency" relation (pg_depend)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL$
13 * NOTES
14 * the genbki.sh script reads this file and generates .bki
15 * information from the DATA() statements.
17 *-------------------------------------------------------------------------
19 #ifndef PG_DEPEND_H
20 #define PG_DEPEND_H
22 #include "catalog/genbki.h"
24 /* ----------------
25 * pg_depend definition. cpp turns this into
26 * typedef struct FormData_pg_depend
27 * ----------------
29 #define DependRelationId 2608
31 CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS
34 * Identification of the dependent (referencing) object.
36 * These fields are all zeroes for a DEPENDENCY_PIN entry.
38 Oid classid; /* OID of table containing object */
39 Oid objid; /* OID of object itself */
40 int4 objsubid; /* column number, or 0 if not used */
43 * Identification of the independent (referenced) object.
45 Oid refclassid; /* OID of table containing object */
46 Oid refobjid; /* OID of object itself */
47 int4 refobjsubid; /* column number, or 0 if not used */
50 * Precise semantics of the relationship are specified by the deptype
51 * field. See DependencyType in catalog/dependency.h.
53 char deptype; /* see codes in dependency.h */
54 } FormData_pg_depend;
56 /* ----------------
57 * Form_pg_depend corresponds to a pointer to a row with
58 * the format of pg_depend relation.
59 * ----------------
61 typedef FormData_pg_depend *Form_pg_depend;
63 /* ----------------
64 * compiler constants for pg_depend
65 * ----------------
67 #define Natts_pg_depend 7
68 #define Anum_pg_depend_classid 1
69 #define Anum_pg_depend_objid 2
70 #define Anum_pg_depend_objsubid 3
71 #define Anum_pg_depend_refclassid 4
72 #define Anum_pg_depend_refobjid 5
73 #define Anum_pg_depend_refobjsubid 6
74 #define Anum_pg_depend_deptype 7
78 * pg_depend has no preloaded contents; system-defined dependencies are
79 * loaded into it during a late stage of the initdb process.
81 * NOTE: we do not represent all possible dependency pairs in pg_depend;
82 * for example, there's not much value in creating an explicit dependency
83 * from an attribute to its relation. Usually we make a dependency for
84 * cases where the relationship is conditional rather than essential
85 * (for example, not all triggers are dependent on constraints, but all
86 * attributes are dependent on relations) or where the dependency is not
87 * convenient to find from the contents of other catalogs.
90 #endif /* PG_DEPEND_H */