1 /*-------------------------------------------------------------------------
4 * definition of the system "shared dependency" relation (pg_shdepend)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/include/catalog/pg_shdepend.h
14 * the genbki.pl script reads this file and generates .bki
15 * information from the DATA() statements.
17 *-------------------------------------------------------------------------
22 #include "catalog/genbki.h"
25 * pg_shdepend definition. cpp turns this into
26 * typedef struct FormData_pg_shdepend
29 #define SharedDependRelationId 1214
31 CATALOG(pg_shdepend,1214) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
34 * Identification of the dependent (referencing) object.
36 * These fields are all zeroes for a DEPENDENCY_PIN entry. Also, dbid can
37 * be zero to denote a shared object.
39 Oid dbid; /* OID of database containing object */
40 Oid classid; /* OID of table containing object */
41 Oid objid; /* OID of object itself */
42 int32 objsubid; /* column number, or 0 if not used */
45 * Identification of the independent (referenced) object. This is always
46 * a shared object, so we need no database ID field. We don't bother with
47 * a sub-object ID either.
49 Oid refclassid; /* OID of table containing object */
50 Oid refobjid; /* OID of object itself */
53 * Precise semantics of the relationship are specified by the deptype
54 * field. See SharedDependencyType in catalog/dependency.h.
56 char deptype; /* see codes in dependency.h */
57 } FormData_pg_shdepend;
60 * Form_pg_shdepend corresponds to a pointer to a row with
61 * the format of pg_shdepend relation.
64 typedef FormData_pg_shdepend *Form_pg_shdepend;
67 * compiler constants for pg_shdepend
70 #define Natts_pg_shdepend 7
71 #define Anum_pg_shdepend_dbid 1
72 #define Anum_pg_shdepend_classid 2
73 #define Anum_pg_shdepend_objid 3
74 #define Anum_pg_shdepend_objsubid 4
75 #define Anum_pg_shdepend_refclassid 5
76 #define Anum_pg_shdepend_refobjid 6
77 #define Anum_pg_shdepend_deptype 7
81 * pg_shdepend 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_shdepend;
85 * for example, there's not much value in creating an explicit dependency
86 * from a relation to its database. Currently, only dependencies on roles
87 * are explicitly stored in pg_shdepend.
90 #endif /* PG_SHDEPEND_H */