Re: setArray()

From: Kris Jurka <books(at)ejurka(dot)com>
To: Conor Beverland <cb801(at)doc(dot)ic(dot)ac(dot)uk>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: setArray()
Date: 2004-01-12 14:51:51
Message-ID: Pine.LNX.4.33.0401120948450.15243-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • setArray() at 2004-01-12 14:40:55 from Conor Beverland

Browse pgsql-jdbc by date

  From Date Subject
Next Message Darin Ohashi 2004-01-12 15:10:43 Driver.connect Timeout
Previous Message Conor Beverland 2004-01-12 14:40:55 setArray()