X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2FmQIPostgres.ml;h=0e6d7c2cccbbd415723f52e594d6893a3fbba733;hb=b5503c72c5560e8da3337e99bf058f0caab350e8;hp=b19a51c83bbb0ccfde390b50ae485df1e8a3a0ed;hpb=91db309a46f8b6f100a36abbc568deec10a8d1df;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/mQIPostgres.ml b/helm/ocaml/mathql_interpreter/mQIPostgres.ml index b19a51c83..0e6d7c2cc 100644 --- a/helm/ocaml/mathql_interpreter/mQIPostgres.ml +++ b/helm/ocaml/mathql_interpreter/mQIPostgres.ml @@ -23,14 +23,12 @@ * http://cs.unibo.it/helm/. *) -let default_connection_string = - "dbname=mowgli user=helm" +(* AUTOR: Ferruccio Guidi + *) -let connection_string = - try Sys.getenv "POSTGRESQL_CONNECTION_STRING" - with Not_found -> default_connection_string +type connection = Postgres.connection -let init () = +let init connection_string = try Some (new Postgres.connection connection_string) with _ -> raise (Failure ("MQIPostgres.init: " ^ connection_string))