From: Ferruccio Guidi Date: Tue, 22 Oct 2002 11:20:08 +0000 (+0000) Subject: mqint.ml patched X-Git-Tag: BEFORE_METADATA_FOR_SORT_AND_REL~15 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=80f9d59bbf55d9748696276b74a41ef079efc56b;p=helm.git mqint.ml patched --- diff --git a/helm/ocaml/mathql_interpreter/mqint.ml b/helm/ocaml/mathql_interpreter/mqint.ml index 8062b11e6..54dc0e05c 100644 --- a/helm/ocaml/mathql_interpreter/mqint.ml +++ b/helm/ocaml/mathql_interpreter/mqint.ml @@ -67,10 +67,8 @@ let galax_db = "galax" let dbname = ref postgres_db let set_database s = - match s with - postgres_db -> dbname := s - | galax_db -> dbname := s - | _ -> raise (Invalid_argument s) + if s = postgres_db || s = galax_db then dbname := s + else raise (Invalid_argument s) let get_database () = ! dbname @@ -123,7 +121,7 @@ let rec exec_set_exp c = function res | MathQL.Relation (rop, path, sexp, attl) -> let before = Sys.time() in - if ! dbname = "db-postgres" then + if ! dbname = postgres_db then (let res = relation_ex rop path (exec_set_exp c sexp) attl in if ! stat then (print_string ("RELATION " ^ (List.hd path) ^ " = " ^ string_of_int(List.length res) ^ ": ");