1
/*-------------------------------------------------------------------------
4
* definition of the system "dependency" relation (pg_depend)
5
* along with the relation's initial contents.
8
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
9
* Portions Copyright (c) 1994, Regents of the University of California
11
* $PostgreSQL: pgsql/src/include/catalog/pg_depend.h,v 1.5 2004-12-31 22:03:24 pgsql Exp $
14
* the genbki.sh script reads this file and generates .bki
15
* information from the DATA() statements.
17
*-------------------------------------------------------------------------
23
* postgres.h contains the system type definitions and the
24
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
25
* can be read by both genbki.sh and the C compiler.
30
* pg_depend definition. cpp turns this into
31
* typedef struct FormData_pg_depend
34
CATALOG(pg_depend) BKI_WITHOUT_OIDS
37
* Identification of the dependent (referencing) object.
39
* These fields are all zeroes for a DEPENDENCY_PIN entry.
41
Oid classid; /* OID of table containing object */
42
Oid objid; /* OID of object itself */
43
int4 objsubid; /* column number, or 0 if not used */
46
* Identification of the independent (referenced) object.
48
Oid refclassid; /* OID of table containing object */
49
Oid refobjid; /* OID of object itself */
50
int4 refobjsubid; /* column number, or 0 if not used */
53
* Precise semantics of the relationship are specified by the deptype
54
* field. See DependencyType in catalog/dependency.h.
56
char deptype; /* see codes in dependency.h */
60
* Form_pg_depend corresponds to a pointer to a row with
61
* the format of pg_depend relation.
64
typedef FormData_pg_depend *Form_pg_depend;
67
* compiler constants for pg_depend
70
#define Natts_pg_depend 7
71
#define Anum_pg_depend_classid 1
72
#define Anum_pg_depend_objid 2
73
#define Anum_pg_depend_objsubid 3
74
#define Anum_pg_depend_refclassid 4
75
#define Anum_pg_depend_refobjid 5
76
#define Anum_pg_depend_refobjsubid 6
77
#define Anum_pg_depend_deptype 7
81
* pg_depend has no preloaded contents; system-defined dependencies are
82
* loaded into it during a late stage of the initdb process.
84
* NOTE: we do not represent all possible dependency pairs in pg_depend;
85
* for example, there's not much value in creating an explicit dependency
86
* from an attribute to its relation. Usually we make a dependency for
87
* cases where the relationship is conditional rather than essential
88
* (for example, not all triggers are dependent on constraints, but all
89
* attributes are dependent on relations) or where the dependency is not
90
* convenient to find from the contents of other catalogs.
93
#endif /* PG_DEPEND_H */