Re: Array support in 8.1 JDBC driver - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Array support in 8.1 JDBC driver
Date
Msg-id Pine.BSO.4.63.0603281552010.189@leary.csoft.net
Whole thread Raw
In response to Array support in 8.1 JDBC driver  (jao@geophile.com)
List pgsql-jdbc

On Tue, 28 Mar 2006, jao@geophile.com wrote:

> I'm not sure I understand this. It sounds like the array is converted
> to a string. Is the string then just pasted into the query?  What does
> this to to the use of server-side prepared statements? I'd like to
> avoid parsing the "same" statement repeatedly due to the use of
> arrays.
>
> Or is the string then somehow used to bind an array to the prepared
> statement?

Yes.  The conversion to string is for the bind parameter.  Basically
setArray takes a java.sql.Array not something like int[].  We also require
a very specific implementation of the java.sql.Array interface to be
passed to the setArray function.  The requirements are that getBaseType
return the correct type value and that calling toString returns the data
in the format that the postgresql server expects for a bind variable.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: gcj has a lot of complaints about 8.1-405 release
Next
From: Kevin Dorne
Date:
Subject: Re: Printing query durations