Commits

Anonymous committed 82c68e5

dbi/pg/bool

  • Participants
  • Parent commits 503a366

Comments (0)

Files changed (1)

src/dbi/dbi_pg.ml

       ~want_ftype:"boolean"
       (fun pres ~row ~col ->
          let str = pres#getvalue row col in
-         failwith "bool/debug: bool = %S" str
-(*
-         try
-           Int64.of_string str
-         with
-         [ Failure "int_of_string" -> raise (Etype "int64" str)
+         match str with
+         [ "t" -> True
+         | "f" -> False
+         | _ -> failwith "Dbi_pg: expected bool (t/f), found %S" str
          ]
-*)
       )
     ;