Re: Getting primitive array types from resultset - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: Getting primitive array types from resultset
Date
Msg-id CADK3HHJSJyerwaUXF__2gwQhDQeyWCjc16WsjAS67U8DVow9aw@mail.gmail.com
Whole thread Raw
In response to Getting primitive array types from resultset  (Juan Fuentes <juanmarianofuentes@gmail.com>)
List pgsql-jdbc
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

pgsql-jdbc by date:

Previous
From: Hari Babu Kommi
Date:
Subject: [pgjdbc/pgjdbc] f78a63: fix: set the loggerName inConnectionFactoryImpl.l...
Next
From: Dave Cramer
Date:
Subject: Reviewers needed for pgjdbc pull requests