Re: setArray() - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: setArray()
Date
Msg-id Pine.LNX.4.33.0401120948450.15243-100000@leary.csoft.net
Whole thread Raw
In response to setArray()  (Conor Beverland <cb801@doc.ic.ac.uk>)
List pgsql-jdbc

On Mon, 12 Jan 2004, Conor Beverland wrote:

> Hi,
>
> I'd like to insert a large array of integers into the database (15000)
> However I can't seem to get PreparedStatement.setArray() to work.
>

At the moment there is no way for user code to instantiate an Array
object, so calling setArray will only work with an array you got from a
ResultSet.

> I saw a patch in the archives regarding this but I'm not in control of
> the java installation which I'm using.
>
> I'm currently converting my array into a string before inserting it
> and using setString()... However this is *very* slow!

Behind the scenes the driver would do the exact same thing, so even if you
could call setArray() it wouldn't help your performace problem.

Kris Jurka




pgsql-jdbc by date:

Previous
From: Conor Beverland
Date:
Subject: setArray()
Next
From: Darin Ohashi
Date:
Subject: Driver.connect Timeout