Re: Getting primitive array types from resultset

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Juan Fuentes <juanmarianofuentes(at)gmail(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Getting primitive array types from resultset
Date: 2018-05-13 12:48:41
Message-ID: CADK3HHJSJyerwaUXF__2gwQhDQeyWCjc16WsjAS67U8DVow9aw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

There is a pull request right now to fix this.
https://github.com/pgjdbc/pgjdbc/pull/1184

Please test it.

Dave Cramer

davec(at)postgresintl(dot)com
www.postgresintl.com

On 10 May 2018 at 12:35, Juan Fuentes <juanmarianofuentes(at)gmail(dot)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
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2018-05-15 13:45:14 Reviewers needed for pgjdbc pull requests
Previous Message Hari Babu Kommi 2018-05-11 12:31:00 [pgjdbc/pgjdbc] f78a63: fix: set the loggerName in ConnectionFactoryImpl.l...