Here is a patch for the "src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java" file. There may need to be other files changed (eg in the jdbc2 or jdbc3 directories), but i don't know where.
1062c1062,1063 < bind(parameterIndex, Float.toString(x), PG_FLOAT); --- > String value = Float.isNaN(x) ? "'NaN'" : Float.toString(x); > bind(parameterIndex, value, PG_FLOAT); 1075c1076,1077 < bind(parameterIndex, Double.toString(x), PG_DOUBLE); --- > String value = Double.isNaN(x) ? "'NaN'" : Double.toString(x); > bind(parameterIndex, value, PG_DOUBLE); 1553a1556,1559 > else if (x instanceof Float) > return ((Float) x).isNaN() ? "'NaN'" : x.toString(); > else if (x instanceof Double) > return ((Double) x).isNaN() ? "'NaN'" : x.toString(); 1555,1556c1561 < x instanceof Double || x instanceof Short || < x instanceof Number || x instanceof Float) --- > x instanceof Number || x instanceof Short)
Regards,
Jon
---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match