      (number? val)        (float val)
      :else                (try
                             (Float/parseFloat val)
-                            (catch Exception _ default)))))
+                            (catch Exception _ (float default))))))
 
 ;; Warning Postgres type float is equivalent to java Double, and Postgres real is equivalent to java Float
 (defn val->double

     val
     (try
       (Boolean/parseBoolean val)
       (catch Exception _ default)))))

(defn json->clj
  ([json]

     (number? val)       (long val)
     :else               (try
                           (Long/parseLong val)
                           (catch Exception _ (long default))))))

;; Warning Postgres type float is equivalent to java Double, and Postgres real is equivalent to java Float
(defn val->float
