1: # 2: /* 3: ** COPYRIGHT 4: ** 5: ** The Regents of the University of California 6: ** 7: ** 1977 8: ** 9: ** This program material is the property of the 10: ** Regents of the University of California and 11: ** may not be reproduced or disclosed without 12: ** the prior written permission of the owner. 13: */ 14: 15: 16: 17: # define AND 0 18: # define OR 1 19: # define UOP 2 /* UNARY OPERATORS */ 20: # define opPLUS 0 21: # define opMINUS 1 22: # define opNOT 2 23: # define opATAN 3 24: # define opCOS 4 25: # define opGAMMA 5 26: # define opLOG 6 27: # define opASCII 7 28: # define opSIN 8 29: # define opSQRT 9 30: # define opABS 10 31: # define opEXP 11 32: # define opINT1 12 33: # define opINT2 13 34: # define opINT4 14 35: # define opFLOAT4 15 36: # define opFLOAT8 16 37: 38: # define BOP 3 /* BINARY OPERATORS */ 39: # define opADD 0 40: # define opSUB 1 41: # define opMUL 2 42: # define opDIV 3 43: # define opPOW 4 44: # define opEQ 5 45: # define opNE 6 46: # define opLT 7 47: # define opLE 8 48: # define opGT 9 49: # define opGE 10 50: # define opMOD 11 51: # define opCONCAT 12 52: 53: # define AOP 4 /* AGGREGATE OPERATORS */ 54: # define opCOUNT 0 55: # define opCOUNTU 1 56: # define opSUM 2 57: # define opSUMU 3 58: # define opAVG 4 59: # define opAVGU 5 60: # define opMIN 6 61: # define opMAX 7 62: # define opANY 8 63: 64: # define COP 5 /* CONSTANT OPERATORS */ 65: # define BADCOP -1 /* error return on lookup */ 66: # define opDBA 0 67: # define opUSERCODE 1 68: # define opDATE 2 69: # define opTIME 3 70: 71: 72: # define RESDOM 11 /* RESULT DOMAIN NUMBER */ 73: # define VAR 12 /* VARIABLE */ 74: # define S_VAR 13 /* variable for which 75: * a substitution has been done, * Only occurs in the ovqp-decomp 76: * merged process. 77: */ 78: 79: # define QMODE 16 /* QUERY MODE */ 80: # define mdRETTERM 0 /* retrieve to terminal, used by decomp-ovqp */ 81: # define mdRETR 1 /* retrieve, into rel perhaps */ 82: # define mdAPP 2 /* append to rel */ 83: # define mdREPL 3 /* replace in rel */ 84: # define mdDEL 4 /* delete from rel */ 85: # define mdCOPY 5 /* copy into/from rel */ 86: # define mdCREATE 6 /* create new relation */ 87: # define mdDESTROY 7 /* destroy old relation */ 88: # define mdHELP 8 /* print info on relation */ 89: # define mdINDEX 9 /* create secondary index */ 90: # define mdMODIFY 10 /* change access structure of rel */ 91: # define mdPRINT 11 /* print rel on terminal */ 92: # define mdRANGE 12 /* declare range variable */ 93: # define mdSAVE 13 /* save relation date */ 94: # define mdDEFINE 14 /* "here is a tree", to qrymod */ 95: # define mdRET_UNI 15 /* retrieve unique */ 96: # define mdVIEW 16 /* extra info for view def, to qrymod */ 97: # define mdUPDATE 17 /* update processor */ 98: # define mdRESETREL 18 /* modify to truncated */ 99: # define mdDISPLAY 19 /* dump qm decl */ 100: # define mdNETQRY 20 /* reserved for distr ingres */ 101: # define mdMOVEREL 21 /* reserved for distr ingres */ 102: # define mdPROT 22 /* extra info for permit def, to qrymod */ 103: # define mdINTEG 23 /* extra info for integrity def, to qrymod */ 104: # define mdDCREATE 24 /* reserved for distr ingres */ 105: # define mdWAITQRY 25 /* reserved for distr ingres */ 106: # define mdREMQM 26 /* remove permit integrity definition */ 107: # define mdDISTRIB 27 /* reserved for distr ingres */ 108: 109: # define ROOT 20 /* ROOT of QUERY TREE */ 110: # define QLEND 21 /* NULL branch at end of QUAL */ 111: # define TREE 25 /* SIGNALS BEGINNING of TREE */ 112: # define BYHEAD 22 /* BY LIST HEAD */ 113: # define AGHEAD 23 /* AGGREGATE HEAD */ 114: 115: # define SITE 26 /* reserved for distr ingres */ 116: 117: # define INT 30 /* INTEGER CONSTANT */ 118: # define FLOAT 31 /* FLOATING POINT CONSTANT */ 119: # define CHAR 32 /* CHARACTER CONSTANT */ 120: # define BINARY 33 /* BINARY CONSTANT (used in printup */ 121: 122: 123: # define RESULTVAR 40 /* RESULT RELATION VAR NO. */ 124: # define SOURCEID 41 /* SOURCE RELATION NAME(S) */ 125: # define RESULTID 42 /* RESULT RELATION NAME */ 126: 127: 128: # define CID 29 /* FOR INTEGRITY CONSTRAINTS */ 129: 130: 131: # define CHANGESTRAT 50 /* FOR OVQP TO DEVISE NEW STRATEGY */ 132: # define USERQRY 51 /* Tells OVQP that the result rel is a user relation */ 133: # define EXIT 52 /* tells OVQP that query is done */ 134: # define ACK 1 /* OVQP should write an acknowledging EOP */ 135: # define NOACK 2 /* OVQP should not acknowledge */ 136: # define RUBACK 3 /* internal mode for DECOMP */ 137: # define REOPENRES 54 /* OVQP should reopen result relation */ 138: # define RETVAL 55 /* RETURN FROM OVQP */ 139: # define UPDATE -3 /* tells DECOMP to call update */ 140: # define NOUPDATE -2 /* tells DECOMP not to call update */ 141: # define EMPTY -1 142: # define NONEMPTY 0 143: # define EOTUP 56 /* end of tuple symbol send by OVQP to equel */ 144: 145: /* The following are pattern matching symbols used by ovqp */ 146: # define PAT_ANY 1 /* matches 0 or more char */ 147: # define PAT_ONE 2 /* matches any one char */ 148: # define PAT_LBRAC 3 /* left bracket for char groupings */ 149: # define PAT_RBRAC 4 /* right bracket for char groupings */