X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQIPostgres.ml;h=260d46c3b00ce74d4f2e7d328c25c9ca06dbab4c;hb=a3466917f94c1910b5e16f1dfe601bd9e8af167e;hp=7c4abcbf62b5beb1496c28b91afbda11b1275e14;hpb=931f10c61b4e3914474955a94a05cf43b5fa2bc0;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQIPostgres.ml b/helm/ocaml/mathql_interpreter/mQIPostgres.ml index 7c4abcbf6..260d46c3b 100644 --- a/helm/ocaml/mathql_interpreter/mQIPostgres.ml +++ b/helm/ocaml/mathql_interpreter/mQIPostgres.ml @@ -26,16 +26,9 @@ (* AUTOR: Ferruccio Guidi *) -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 -> ()