Annotation of 42BSD/ingres/source/h/catalog.h, revision 1.1.1.1

1.1       root        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   7.1     2/5/81
                      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: 
                     45: struct index
                     46: {
                     47:        char    irelidp[MAXNAME];       /*unique name of primary relation       */
                     48:        char    iownerp[2];             /*owner of primary relation*/
                     49:        char    irelidi[MAXNAME];       /*unique name of index relation */
                     50:        char    irelspeci;              /*relspec of index relation*/
                     51:        char    idom[MAXKEYS];          /* domain number of primary relation */
                     52:                                        /* which corresponds to each index attribute */
                     53:                                        /* In the indexes relation these are stored as */
                     54:                                        /* idom1, idom2, ..,idom6 */
                     55: };
                     56: 
                     57: 
                     58: 
                     59: /*
                     60: **  TREE RELATION STRUCT
                     61: **
                     62: **     The TREE relation stores trees used by query modification and
                     63: **     for distribution criteria.
                     64: */
                     65: 
                     66: struct tree
                     67: {
                     68:        char    treerelid[MAXNAME];     /* relation name */
                     69:        char    treeowner[2];           /* relation owner */
                     70:        short   treeid;                 /* internal name of this tuple */
                     71:        short   treeseq;                /* sequence number in tree */
                     72:        char    treetype;               /* type info for this tree */
                     73:        char    treexxxx;
                     74:        char    treetree[100];          /* contents of tree */
                     75: };
                     76: 
                     77: # define       TREERELID       1
                     78: # define       TREEOWNER       2
                     79: # define       TREEID          3
                     80: # define       TREESEQ         4
                     81: # define       TREETYPE        5
                     82: 
                     83: 
                     84: 
                     85: /*
                     86: **  STRUCT PROTECT -- protection catalog
                     87: **
                     88: **     This structure defines the format of the 'protect' catalog.
                     89: **     One or two things should be noted.  First, the 'prodomset'
                     90: **     field is actually four domains in the physical relation,
                     91: **     since the best we know about is i4's, and we need an i16.
                     92: **     Second, both the proopset and the prodomset fields
                     93: **     are bit maps.
                     94: */
                     95: 
                     96: struct protect
                     97: {
                     98:        char    prorelid[MAXNAME];      /* relation to which this applies */
                     99:        char    prorelown[2];           /* owner */
                    100:        short   propermid;              /* permission sequence number */
                    101:        char    prouser[2];             /* user code in PERMIT */
                    102:        char    proterm[8];             /* terminal in PERMIT */
                    103:        char    proresvar;              /* Resultvarno in tree */
                    104:        char    proopset;               /* operation set */
                    105:        short   protodbgn;              /* beginning time of day */
                    106:        short   protodend;              /* ending time of day */
                    107:        char    prodowbgn;              /* beginning day of week */
                    108:        char    prodowend;              /* ending day of week */
                    109:        short   prodomset[8];           /* domain set permitted */
                    110:        short   protree;                /* link to qualification */
                    111: };
                    112: 
                    113: /* field numbers for find() calls */
                    114: # define       PRORELID        1
                    115: # define       PRORELOWN       2
                    116: # define       PROPERMID       3
                    117: # define       PROTREE         16
                    118: 
                    119: /* bit values for proopset */
                    120: # define       PRO_RETR        0001    /* retrieve */
                    121: # define       PRO_REPL        0002    /* replace */
                    122: # define       PRO_DEL         0004    /* delete */
                    123: # define       PRO_APP         0010    /* append */
                    124: # define       PRO_TEST        0020    /* test in qualification */
                    125: # define       PRO_AGGR        0040    /* retrieve aggregate value */
                    126: 
                    127: 
                    128: 
                    129: /*
                    130: **  STRUCT INTEGRITY -- the descriptor for the integrity relation
                    131: */
                    132: 
                    133: struct integrity
                    134: {
                    135:        char    intrelid[MAXNAME];      /* name of the relation */
                    136:        char    intrelowner[2];         /* owner of the relation */
                    137:        short   inttree;                /* pointer into the tree catalog */
                    138:        short   intdomset[8];           /* set of domains this applies to */
                    139:        char    intresvar;              /* primary variable number */
                    140: };
                    141: 
                    142: # define       INTRELID        1
                    143: # define       INTRELOWNER     2
                    144: # define       INTTREE         3

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.