Annotation of 43BSD/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   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

unix.superglobalmegacorp.com

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