Re: setArray() - Mailing list pgsql-jdbc

From Andrew Lazarus
Subject Re: setArray()
Date
Msg-id 013c01c3d9e4$e6d119a0$847ba8c0@ANDYXP
Whole thread Raw
In response to setArray()  (Conor Beverland <cb801@doc.ic.ac.uk>)
List pgsql-jdbc
I have the same issue, but my Array is much smaller. As you see downthread,
there is no practical way to use setArray().

As for speed: Are you using a StringBuffer allocated sufficiently large to
begin with, not a String? (My last line is

return new String(sbuffer);

HTH.

----- Original Message -----
From: "Conor Beverland" <cb801@doc.ic.ac.uk>
To: <pgsql-jdbc@postgresql.org>
Sent: Monday, January 12, 2004 6:40 AM
Subject: [JDBC] setArray()


> 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.
>
> 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!
>
> Any advice would be much appreciated,
> Conor
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match


pgsql-jdbc by date:

Previous
From: Anderson dos Santos
Date:
Subject: to leave
Next
From: John Gibson
Date:
Subject: "Best" Pre-compiled driver for PostgreSQL 7.2.2 ?