1: #
   2: /*
   3: **  CATALOG.H -- system catalog definitions
   4: **
   5: **	relation and attribute catalogs are defined in ingres.h.
   6: **
   7: **	Version:
   8: **		@(#)catalog.h	8.1	12/31/84
   9: */
  10: 
  11: 
  12: 
  13: /*
  14: **	INDEX relation struct
  15: **
  16: **	The INDEX relation is used to determine what, if any,
  17: **	secondary indicies exist for relations.  If a relation
  18: **	has a secondary index, there will be one tuple in the
  19: **	INDEX relation for each such index.  There may be one
  20: **	or more domains indexed by one or many INDEX relations
  21: **	depending on whether single or combined indicies are
  22: **	being used.
  23: **
  24: **	Combined indices may use up to six domains to form the
  25: **	index.
  26: **
  27: **	The simple existance of a secondary index is better
  28: **	checked using the "relindxd" field in the RELATION
  29: **	relation, since that is more efficient.
  30: **
  31: **	The two values SECINDEX and SECBASE are the values for
  32: **	the relindxd field of the relation relation.  Implicitly
  33: **	SECINDEX must be < 0 and SECBASE must be > 0.
  34: */
  35: 
  36: # define    IRELIDP     1
  37: # define    IOWNERP     2
  38: # define    IRELIDI     3
  39: 
  40: # define    SECINDEX    -2  /* this value in rel.relindxd indicates
  41: 					** that the relation is a sec. index */
  42: # define    SECBASE     1   /* this value in rel.relindxd indicates
  43: 					** has a sec. index */
  44: # define    ORDERED     3   /* this value in rel.relindxd in
  45: 					** absolute value indicates that the
  46: 					** relation is ordered, if >0 also
  47: 					** indexed */
  48: 
  49: struct index
  50: {
  51:     char    irelidp[MAXNAME];   /*unique name of primary relation	*/
  52:     char    iownerp[2];     /*owner of primary relation*/
  53:     char    irelidi[MAXNAME];   /*unique name of index relation	*/
  54:     char    irelspeci;      /*relspec of index relation*/
  55:     char    idom[MAXKEYS];      /* domain number of primary relation */
  56:                     /* which corresponds to each index attribute */
  57:                     /* In the indexes relation these are stored as */
  58:                     /* idom1, idom2, ..,idom6 */
  59: };
  60: 
  61: 
  62: 
  63: /*
  64: **  TREE RELATION STRUCT
  65: **
  66: **	The TREE relation stores trees used by query modification and
  67: **	for distribution criteria.
  68: */
  69: 
  70: struct tree
  71: {
  72:     char    treerelid[MAXNAME]; /* relation name */
  73:     char    treeowner[2];       /* relation owner */
  74:     short   treeid;         /* internal name of this tuple */
  75:     short   treeseq;        /* sequence number in tree */
  76:     char    treetype;       /* type info for this tree */
  77:     char    treexxxx;
  78:     char    treetree[100];      /* contents of tree */
  79: };
  80: 
  81: # define    TREERELID   1
  82: # define    TREEOWNER   2
  83: # define    TREEID      3
  84: # define    TREESEQ     4
  85: # define    TREETYPE    5
  86: 
  87: 
  88: 
  89: /*
  90: **  STRUCT PROTECT -- protection catalog
  91: **
  92: **	This structure defines the format of the 'protect' catalog.
  93: **	One or two things should be noted.  First, the 'prodomset'
  94: **	field is actually four domains in the physical relation,
  95: **	since the best we know about is i4's, and we need an i16.
  96: **	Second, both the proopset and the prodomset fields
  97: **	are bit maps.
  98: */
  99: 
 100: struct protect
 101: {
 102:     char    prorelid[MAXNAME];  /* relation to which this applies */
 103:     char    prorelown[2];       /* owner */
 104:     short   propermid;      /* permission sequence number */
 105:     char    prouser[2];     /* user code in PERMIT */
 106:     char    proterm[8];     /* terminal in PERMIT */
 107:     char    proresvar;      /* Resultvarno in tree */
 108:     char    proopset;       /* operation set */
 109:     short   protodbgn;      /* beginning time of day */
 110:     short   protodend;      /* ending time of day */
 111:     char    prodowbgn;      /* beginning day of week */
 112:     char    prodowend;      /* ending day of week */
 113:     short   prodomset[8];       /* domain set permitted */
 114:     short   protree;        /* link to qualification */
 115: };
 116: 
 117: /* field numbers for find() calls */
 118: # define    PRORELID    1
 119: # define    PRORELOWN   2
 120: # define    PROPERMID   3
 121: # define    PROTREE     16
 122: 
 123: /* bit values for proopset */
 124: # define    PRO_RETR    0001    /* retrieve */
 125: # define    PRO_REPL    0002    /* replace */
 126: # define    PRO_DEL     0004    /* delete */
 127: # define    PRO_APP     0010    /* append */
 128: # define    PRO_TEST    0020    /* test in qualification */
 129: # define    PRO_AGGR    0040    /* retrieve aggregate value */
 130: 
 131: 
 132: 
 133: /*
 134: **  STRUCT INTEGRITY -- the descriptor for the integrity relation
 135: */
 136: 
 137: struct integrity
 138: {
 139:     char    intrelid[MAXNAME];  /* name of the relation */
 140:     char    intrelowner[2];     /* owner of the relation */
 141:     short   inttree;        /* pointer into the tree catalog */
 142:     short   intdomset[8];       /* set of domains this applies to */
 143:     char    intresvar;      /* primary variable number */
 144: };
 145: 
 146: # define    INTRELID    1
 147: # define    INTRELOWNER 2
 148: # define    INTTREE     3

Defined struct's

index defined in line 49; never used
integrity defined in line 137; never used
protect defined in line 100; never used
tree defined in line 70; never used

Defined macros

INTRELID defined in line 146; never used
INTRELOWNER defined in line 147; never used
INTTREE defined in line 148; never used
IOWNERP defined in line 37; never used
IRELIDI defined in line 38; never used
IRELIDP defined in line 36; never used
ORDERED defined in line 44; never used
PROPERMID defined in line 120; never used
PRORELID defined in line 118; never used
PRORELOWN defined in line 119; never used
PROTREE defined in line 121; never used
PRO_AGGR defined in line 129; never used
PRO_APP defined in line 127; never used
PRO_DEL defined in line 126; never used
PRO_REPL defined in line 125; never used
PRO_RETR defined in line 124; never used
PRO_TEST defined in line 128; never used
SECBASE defined in line 42; never used
SECINDEX defined in line 40; never used
TREEID defined in line 83; never used
TREEOWNER defined in line 82; never used
TREERELID defined in line 81; never used
TREESEQ defined in line 84; never used
TREETYPE defined in line 85; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 723
Valid CSS Valid XHTML 1.0 Strict