BlackMage wrote:
> query.setObject(1, "{28.1, 29.2}");
> org.postgresql.util.PSQLException: ERROR: column "field_1" is of type
> interval[] but expression is of type character varying
The two-argument form of setObject() infers a type of Types.VARCHAR for
a java.lang.String (see the JDBC spec)
> So is there another way of entering an array of intervals into a postgresql
> database using prepared statement? What am I doing wrong?
Try:
query.setObject(1, "{28.1, 29.2}", Types.OTHER);
-O