--- /dev/null
+BIN_DIR = /usr/local/bin
+REQUIRES = postgres
+PREDICATES =
+OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -pp camlp4o
+OCAMLFIND = ocamlfind
+OCAMLC = $(OCAMLFIND) ocamlc -thread $(OCAMLOPTIONS)
+OCAMLOPT = $(OCAMLFIND) ocamlopt -thread $(OCAMLOPTIONS)
+OCAMLDEP = ocamldep -pp camlp4o
+
+LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+
+OBJS = query.cmo
+
+rdfly: $(OBJS) $(LIBRARIES)
+ $(OCAMLC) -linkpkg -o $@ $(OBJS)
+
+rdfly.opt: $(OBJS:.cmo=.cmx) $(LIBRARIES_OPT)
+ $(OCAMLOPT) -linkpkg -o rdfly.opt $(OBJS:.cmo=.cmx)
+
+.SUFFIXES: .ml .mli .cmo .cmi .cmx
+.ml.cmo:
+ $(OCAMLC) -c $<
+.mli.cmi:
+ $(OCAMLC) -c $<
+.ml.cmx:
+ $(OCAMLOPT) -c $<
+
+$(OBJS): $(LIBRARIES)
+$(OBJS:.cmo=.cmx)): $(LIBRARIES_OPT)
+
+clean:
+ rm -f *.cm[iox] *.o rdfly rdfly.opt
+
+.PHONY: install uninstall clean
+
--- /dev/null
+
+let db = Postgres.Connection.connect "dbname=mowgli user=helm host=mowgli.cs.unibo.it"
+
+let _ =
+ let status =
+ match Postgres.Connection.status db with
+ Postgres.Connection.Ok -> "ok"
+ | _ -> "bad"
+ in
+ Printf.printf "connection status is %s\n" status ;
+ flush stdout
+
+let res = Postgres.Connection.exec db "SELECT * FROM refObj WHERE source = 'cic:/Coq/Arith/Le/le_O_n.con';"
+
+let _ =
+ Printf.printf "# results: %d\n" (Postgres.Result.ntuples res) ;
+ flush stdout