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
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) ^ ": ");