Getting primitive array types from resultset

From: Juan Fuentes <juanmarianofuentes(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Getting primitive array types from resultset
Date: 2018-05-10 16:35:30
Message-ID: 6BA36202-05D3-4C77-B6B0-47E3BA99116C@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Hari Babu Kommi 2018-05-11 12:31:00 [pgjdbc/pgjdbc] f78a63: fix: set the loggerName in ConnectionFactoryImpl.l...
Previous Message Jorge Solorzano 2018-05-10 05:40:54 [pgjdbc/pgjdbc] 354d28: fix: error on Travis build head (#1186)