00001 /*------------------------------------------------------------------------- 00002 * 00003 * pg_depend.h 00004 * definition of the system "dependency" relation (pg_depend) 00005 * along with the relation's initial contents. 00006 * 00007 * 00008 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 00009 * Portions Copyright (c) 1994, Regents of the University of California 00010 * 00011 * src/include/catalog/pg_depend.h 00012 * 00013 * NOTES 00014 * the genbki.pl script reads this file and generates .bki 00015 * information from the DATA() statements. 00016 * 00017 *------------------------------------------------------------------------- 00018 */ 00019 #ifndef PG_DEPEND_H 00020 #define PG_DEPEND_H 00021 00022 #include "catalog/genbki.h" 00023 00024 /* ---------------- 00025 * pg_depend definition. cpp turns this into 00026 * typedef struct FormData_pg_depend 00027 * ---------------- 00028 */ 00029 #define DependRelationId 2608 00030 00031 CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS 00032 { 00033 /* 00034 * Identification of the dependent (referencing) object. 00035 * 00036 * These fields are all zeroes for a DEPENDENCY_PIN entry. 00037 */ 00038 Oid classid; /* OID of table containing object */ 00039 Oid objid; /* OID of object itself */ 00040 int32 objsubid; /* column number, or 0 if not used */ 00041 00042 /* 00043 * Identification of the independent (referenced) object. 00044 */ 00045 Oid refclassid; /* OID of table containing object */ 00046 Oid refobjid; /* OID of object itself */ 00047 int32 refobjsubid; /* column number, or 0 if not used */ 00048 00049 /* 00050 * Precise semantics of the relationship are specified by the deptype 00051 * field. See DependencyType in catalog/dependency.h. 00052 */ 00053 char deptype; /* see codes in dependency.h */ 00054 } FormData_pg_depend; 00055 00056 /* ---------------- 00057 * Form_pg_depend corresponds to a pointer to a row with 00058 * the format of pg_depend relation. 00059 * ---------------- 00060 */ 00061 typedef FormData_pg_depend *Form_pg_depend; 00062 00063 /* ---------------- 00064 * compiler constants for pg_depend 00065 * ---------------- 00066 */ 00067 #define Natts_pg_depend 7 00068 #define Anum_pg_depend_classid 1 00069 #define Anum_pg_depend_objid 2 00070 #define Anum_pg_depend_objsubid 3 00071 #define Anum_pg_depend_refclassid 4 00072 #define Anum_pg_depend_refobjid 5 00073 #define Anum_pg_depend_refobjsubid 6 00074 #define Anum_pg_depend_deptype 7 00075 00076 00077 /* 00078 * pg_depend has no preloaded contents; system-defined dependencies are 00079 * loaded into it during a late stage of the initdb process. 00080 * 00081 * NOTE: we do not represent all possible dependency pairs in pg_depend; 00082 * for example, there's not much value in creating an explicit dependency 00083 * from an attribute to its relation. Usually we make a dependency for 00084 * cases where the relationship is conditional rather than essential 00085 * (for example, not all triggers are dependent on constraints, but all 00086 * attributes are dependent on relations) or where the dependency is not 00087 * convenient to find from the contents of other catalogs. 00088 */ 00089 00090 #endif /* PG_DEPEND_H */