~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/catalog/pg_depend.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * pg_depend.h
 
4
 *        definition of the system "dependency" relation (pg_depend)
 
5
 *        along with the relation's initial contents.
 
6
 *
 
7
 *
 
8
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
9
 * Portions Copyright (c) 1994, Regents of the University of California
 
10
 *
 
11
 * $PostgreSQL: pgsql/src/include/catalog/pg_depend.h,v 1.5 2004-12-31 22:03:24 pgsql Exp $
 
12
 *
 
13
 * NOTES
 
14
 *        the genbki.sh script reads this file and generates .bki
 
15
 *        information from the DATA() statements.
 
16
 *
 
17
 *-------------------------------------------------------------------------
 
18
 */
 
19
#ifndef PG_DEPEND_H
 
20
#define PG_DEPEND_H
 
21
 
 
22
/* ----------------
 
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.
 
26
 * ----------------
 
27
 */
 
28
 
 
29
/* ----------------
 
30
 *              pg_depend definition.  cpp turns this into
 
31
 *              typedef struct FormData_pg_depend
 
32
 * ----------------
 
33
 */
 
34
CATALOG(pg_depend) BKI_WITHOUT_OIDS
 
35
{
 
36
        /*
 
37
         * Identification of the dependent (referencing) object.
 
38
         *
 
39
         * These fields are all zeroes for a DEPENDENCY_PIN entry.
 
40
         */
 
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 */
 
44
 
 
45
        /*
 
46
         * Identification of the independent (referenced) object.
 
47
         */
 
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 */
 
51
 
 
52
        /*
 
53
         * Precise semantics of the relationship are specified by the deptype
 
54
         * field.  See DependencyType in catalog/dependency.h.
 
55
         */
 
56
        char            deptype;                /* see codes in dependency.h */
 
57
} FormData_pg_depend;
 
58
 
 
59
/* ----------------
 
60
 *              Form_pg_depend corresponds to a pointer to a row with
 
61
 *              the format of pg_depend relation.
 
62
 * ----------------
 
63
 */
 
64
typedef FormData_pg_depend *Form_pg_depend;
 
65
 
 
66
/* ----------------
 
67
 *              compiler constants for pg_depend
 
68
 * ----------------
 
69
 */
 
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
 
78
 
 
79
 
 
80
/*
 
81
 * pg_depend has no preloaded contents; system-defined dependencies are
 
82
 * loaded into it during a late stage of the initdb process.
 
83
 *
 
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.
 
91
 */
 
92
 
 
93
#endif   /* PG_DEPEND_H */