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