]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/mathql_interpreter/mQIPostgres.ml
patched and improved
[helm.git] / helm / ocaml / mathql_interpreter / mQIPostgres.ml
index 7c4abcbf62b5beb1496c28b91afbda11b1275e14..260d46c3b00ce74d4f2e7d328c25c9ca06dbab4c 100644 (file)
 (*  AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
  *)
 
-let default_connection_string =
-   "dbname=mowgli user=helm"
-
-let connection_string =
-   try Sys.getenv "POSTGRESQL_CONNECTION_STRING"
-   with Not_found -> default_connection_string 
-
-let init () =
+let init connection_string =
    try Some (new Postgres.connection connection_string)
-   with _ -> raise (Failure ("MQIPostgres.init: " ^ connection_string))
+   with _ -> None
 
 let close = function
    |  None   -> ()