Thread: Getting primitive array types from resultset
As the subject indicates, any examples of how to archive this?
Looking at the 42.2.0 release change-log links I have been able to find how to set them on a preparedStatement using:
preparedStatement.setObject(paramIndex, param, Types.ARRAY);
Getting them seems to not to work.
value = resultSet.getObject("arrayColumnName", int[].class);
org.postgresql.util.PSQLException: conversion to class [I from 2,003 not supported
Juan
There is a pull request right now to fix this.https://github.com/pgjdbc/pgjdbc/pull/1184
Please test it.
On 10 May 2018 at 12:35, Juan Fuentes <juanmarianofuentes@gmail.com> wrote:
As the subject indicates, any examples of how to archive this?Looking at the 42.2.0 release change-log links I have been able to find how to set them on a preparedStatement using:preparedStatement.setObject(paramIndex, param, Types.ARRAY); Getting them seems to not to work.value = resultSet.getObject("arrayColumnName", int[].class); org.postgresql.util.PSQLException: conversion to class [I from 2,003 not supported Juan